2021-01-26 15:01:44 +03:00
|
|
|
name: zfs-tests-functional
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests-functional-ubuntu:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [18.04, 20.04]
|
|
|
|
runs-on: ubuntu-${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2022-02-09 22:50:13 +03:00
|
|
|
- name: Reclaim disk space
|
|
|
|
run: |
|
|
|
|
${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh
|
2021-01-26 15:01:44 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-02-07 22:44:17 +03:00
|
|
|
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
|
|
|
|
sudo apt-get clean
|
2021-01-26 15:01:44 +03:00
|
|
|
- name: Autogen.sh
|
|
|
|
run: |
|
2022-02-07 22:44:17 +03:00
|
|
|
./autogen.sh
|
2021-01-26 15:01:44 +03:00
|
|
|
- name: Configure
|
|
|
|
run: |
|
2022-02-04 01:35:38 +03:00
|
|
|
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
|
2021-01-26 15:01:44 +03:00
|
|
|
- name: Make
|
|
|
|
run: |
|
2022-02-07 22:44:17 +03:00
|
|
|
make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
|
2021-01-26 15:01:44 +03:00
|
|
|
- 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
|
2021-10-25 20:27:05 +03:00
|
|
|
# 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
|
2022-02-07 22:44:17 +03:00
|
|
|
- name: Clear the kernel ring buffer
|
|
|
|
run: |
|
|
|
|
sudo dmesg -c >/var/tmp/dmesg-prerun
|
2022-02-09 22:50:13 +03:00
|
|
|
- name: Report disk space
|
|
|
|
run: |
|
|
|
|
df -h /
|
2021-01-26 15:01:44 +03:00
|
|
|
- name: Tests
|
|
|
|
run: |
|
2022-02-16 22:40:25 +03:00
|
|
|
set -o pipefail
|
|
|
|
/usr/share/zfs/zfs-tests.sh -vR -s 3G | scripts/zfs-tests-color.sh
|
|
|
|
shell: bash
|
2022-01-25 02:54:52 +03:00
|
|
|
timeout-minutes: 330
|
2021-01-26 15:01:44 +03:00
|
|
|
- name: Prepare artifacts
|
|
|
|
if: failure()
|
|
|
|
run: |
|
|
|
|
RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
|
|
|
|
sudo dmesg > $RESULTS_PATH/dmesg
|
2022-02-07 22:44:17 +03:00
|
|
|
sudo cp /var/log/syslog /var/tmp/dmesg-prerun $RESULTS_PATH/
|
2021-01-26 15:01:44 +03:00
|
|
|
sudo chmod +r $RESULTS_PATH/*
|
|
|
|
# Replace ':' in dir names, actions/upload-artifact doesn't support it
|
2021-12-02 03:18:45 +03:00
|
|
|
for f in $(find /var/tmp/test_results -name '*:*'); do mv "$f" "${f//:/__}"; done
|
2021-01-26 15:01:44 +03:00
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Test logs Ubuntu-${{ matrix.os }}
|
2022-02-07 22:44:17 +03:00
|
|
|
path: |
|
|
|
|
/var/tmp/test_results/*
|
|
|
|
!/var/tmp/test_results/current
|
2021-01-26 15:01:44 +03:00
|
|
|
if-no-files-found: ignore
|