Skip to content

Commit

Permalink
ZTS: Fix summary page creation
Browse files Browse the repository at this point in the history
There are cases, where some needed files for the summary page aren't
created. Currently the whole Summary Page creation will fail then.
Sample run: https://github.com/openzfs/zfs/actions/runs/11148248072/job/30999748588

Fix this, by properly checking for existence of the needed files.

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Rob Norris <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#16599
  • Loading branch information
mcmilk authored and tonyhutter committed Oct 3, 2024
1 parent 17a2b35 commit 7f7d039
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/scripts/qemu-6-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,44 @@ case "$1" in
sudo mv -f /tmp/*.txt /var/tmp
sudo -E modprobe zfs
TDIR="/usr/share/zfs"

# Enable swap to mitigate some OOM conditions like:
# https://github.com/openzfs/zfs/issues/16566
#
# Directions for setting up swap on btrfs (Fedora) from:
# https://btrfs.readthedocs.io/en/latest/Swapfile.html
echo "setting up swap"
if ! sudo truncate -s 0 /swapfile &> /dev/null ; then
echo "truncate failed"
fi

if ! sudo chattr +C /swapfile &> /dev/null ; then
echo "chattr failed"
fi

if ! sudo fallocate -l 16G /swapfile &> /dev/null ; then
echo "fallocate failed"
fi
if ! sudo chmod 0600 /swapfile &> /dev/null ; then
echo "chmod failed"
fi
if ! sudo mkswap /swapfile &> /dev/null ; then
echo "mkswap failed"
fi

if ! sudo swapon /swapfile &> /dev/null ; then
echo "Swapon failed"
fi
;;
esac

# run functional testings and save exitcode
cd /var/tmp
TAGS=$2/$3
# TAGS=$2/$3
if [ "$4" == "quick" ]; then
export RUNFILES="sanity.run"
fi
TAGS=raidz
sudo dmesg -c > dmesg-prerun.txt
mount > mount.txt
df -h > df-prerun.txt
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/scripts/qemu-9-summary-page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ function output() {
}

function outfile() {
test -s "$1" || return
cat "$1" >> "out-$logfile.md"
}

function outfile_plain() {
test -s "$1" || return
output "<pre>"
cat "$1" >> "out-$logfile.md"
output "</pre>"
Expand Down

0 comments on commit 7f7d039

Please sign in to comment.