2020-12-08 20:53:45 +03:00
|
|
|
name: zfs-tests-sanity
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install --yes -qq build-essential autoconf libtool gdb lcov \
|
|
|
|
git alien fakeroot wget curl bc fio acl \
|
|
|
|
sysstat mdadm lsscsi parted gdebi attr dbench watchdog ksh \
|
|
|
|
nfs-kernel-server samba rng-tools xz-utils \
|
|
|
|
zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
|
|
|
|
xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
|
|
|
|
libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
|
2022-01-13 19:51:12 +03:00
|
|
|
libpam0g-dev pamtester libcurl4-openssl-dev \
|
|
|
|
python3 python3-dev python3-setuptools python3-cffi python3-packaging
|
2020-12-08 20:53:45 +03:00
|
|
|
- name: Autogen.sh
|
|
|
|
run: |
|
|
|
|
sh autogen.sh
|
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
./configure --enable-debug --enable-debuginfo
|
|
|
|
- name: Make
|
|
|
|
run: |
|
|
|
|
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
|
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
|
2021-04-01 18:39:27 +03:00
|
|
|
# Workaround to provide additional free space for testing.
|
|
|
|
# https://github.com/actions/virtual-environments/issues/2840
|
|
|
|
sudo rm -rf /usr/share/dotnet
|
|
|
|
sudo rm -rf /opt/ghc
|
|
|
|
sudo rm -rf "/usr/local/share/boost"
|
|
|
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
2020-12-08 20:53:45 +03:00
|
|
|
- name: Tests
|
|
|
|
run: |
|
2021-12-01 20:38:53 +03:00
|
|
|
/usr/share/zfs/zfs-tests.sh -vR -s 3G -r sanity
|
2022-01-25 02:54:52 +03:00
|
|
|
timeout-minutes: 330
|
2020-12-08 20:53:45 +03:00
|
|
|
- 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 $RESULTS_PATH/
|
|
|
|
sudo chmod +r $RESULTS_PATH/*
|
2021-01-26 15:01:44 +03:00
|
|
|
# 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
|
2020-12-08 20:53:45 +03:00
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Test logs
|
|
|
|
path: /var/tmp/test_results/20*/
|
|
|
|
if-no-files-found: ignore
|