Tag zfs-2.1.16 #499
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: zfs-tests-functional | |
on: | |
push: | |
pull_request: | |
jobs: | |
tests-functional-ubuntu: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [20.04, 22.04] | |
runs-on: ubuntu-${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install dependencies | |
run: | | |
# https://github.com/orgs/community/discussions/47863 | |
sudo apt-mark hold grub-efi-amd64-signed | |
sudo apt-get update --fix-missing | |
sudo apt-get upgrade | |
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq | |
sudo apt-get clean | |
- name: Autogen.sh | |
run: | | |
sh autogen.sh | |
- name: Configure | |
run: | | |
./configure --enable-debug --enable-debuginfo | |
- name: Make | |
run: | | |
# Hack for zfs-2.1.16+ | |
# | |
# When Alien converts the RPMs to DEB packages, it calls this line: | |
# | |
# $this->do("rpm2cpio '".$this->filename."' | (cd $workdir; $decomp cpio | |
# --extract --make-directories --no-absolute-filenames | |
# --preserve-modification-time) 2>&1") | |
# | |
# This seems to fail with zfs-2.1.16 with: | |
# | |
# cpio: ./usr/src/spl-2.1.16/6.5.0-1025-azure: Cannot open: No such file or directory | |
# | |
# The workaround is just to always return true from the 'cpio' command. | |
# This does not seem to affect anything. | |
sudo sed -i 's/preserve-modification-time/preserve-modification-time | true/g' /usr/share/perl5/Alien/Package/Rpm.pm | |
make --no-print-directory -s pkg-utils pkg-kmod | |
- name: Install | |
run: | | |
sudo dpkg -i *.deb | |
# Update order of directories to search for modules, otherwise | |
# Ubuntu will load kernel-shipped ones. | |
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf | |
sudo depmod | |
sudo modprobe zfs | |
# Workaround for cloud-init bug | |
# see https://github.com/openzfs/zfs/issues/12644 | |
FILE=/lib/udev/rules.d/10-cloud-init-hook-hotplug.rules | |
if [ -r "${FILE}" ]; then | |
HASH=$(md5sum "${FILE}" | awk '{ print $1 }') | |
if [ "${HASH}" = "121ff0ef1936cd2ef65aec0458a35772" ]; then | |
# Just shove a zd* exclusion right above the hotplug hook... | |
sudo sed -i -e s/'LABEL="cloudinit_hook"'/'KERNEL=="zd*", GOTO="cloudinit_end"\n&'/ "${FILE}" | |
sudo udevadm control --reload-rules | |
fi | |
fi | |
- name: Clear the kernel ring buffer | |
run: | | |
sudo dmesg -c >/var/tmp/dmesg-prerun | |
- name: Reclaim and report disk space | |
run: | | |
${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh | |
df -h / | |
- name: Tests | |
run: | | |
/usr/share/zfs/zfs-tests.sh -vR -s 3G | |
timeout-minutes: 330 | |
- name: Prepare artifacts | |
if: failure() | |
run: | | |
RESULTS_PATH=$(readlink -f /var/tmp/test_results/current) | |
sudo dmesg > $RESULTS_PATH/dmesg | |
sudo cp /var/log/syslog /var/tmp/dmesg-prerun $RESULTS_PATH/ | |
sudo chmod +r $RESULTS_PATH/* | |
# Replace ':' in dir names, actions/upload-artifact doesn't support it | |
for f in $(find /var/tmp/test_results -name '*:*'); do mv "$f" "${f//:/__}"; done | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: Test logs Ubuntu-${{ matrix.os }} | |
path: | | |
/var/tmp/test_results/* | |
!/var/tmp/test_results/current | |
if-no-files-found: ignore |