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