Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing qemu #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading