From 055230ca800d8a7d8932af3a5118a0e7c00f9445 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Fri, 3 Mar 2023 10:56:37 +0100 Subject: [PATCH] Split functional testings via github action matrix This commit changes the workflow of the github actions. We split the workflow into different parts: 1) build zfs modules for Ubuntu 20.04 and 22.04 (~25m) 2) 2x zloop test (~10m) + 2x sanity test (~25m) 3) functional testings in parts 1..5 (each ~1h) 4) cleanup and create summary When everything is fine, the full run with all testings should be done in around 2 hours. The codeql.yml and checkstyle.yml are not part in this circle. The testings are also modfied a bit: - report info about CPU and checksum benchmarks - reset the debugging logs for each test - when some error occurred, we call dmesg with -c to get only the log output for the last failed test - we empty also the dbgsys Signed-off-by: Tino Reichardt --- .github/workflows/README.md | 51 +++++++++ .github/workflows/build-dependencies.txt | 25 ++-- .github/workflows/scripts/generate-summary.sh | 73 ++++++++++++ .../workflows/scripts/reclaim_disk_space.sh | 23 ---- .../workflows/scripts/setup-dependencies.sh | 91 +++++++++++++++ .github/workflows/scripts/setup-functional.sh | 24 ++++ .github/workflows/zfs-linux-tests.yml | 107 ++++++++++++++++++ .github/workflows/zfs-linux.yml | 60 ++++++++++ .github/workflows/zfs-tests-functional.yml | 86 -------------- .github/workflows/zfs-tests-sanity.yml | 82 -------------- .github/workflows/zloop.yml | 65 ----------- 11 files changed, 415 insertions(+), 272 deletions(-) create mode 100644 .github/workflows/README.md create mode 100755 .github/workflows/scripts/generate-summary.sh delete mode 100755 .github/workflows/scripts/reclaim_disk_space.sh create mode 100755 .github/workflows/scripts/setup-dependencies.sh create mode 100755 .github/workflows/scripts/setup-functional.sh create mode 100644 .github/workflows/zfs-linux-tests.yml create mode 100644 .github/workflows/zfs-linux.yml delete mode 100644 .github/workflows/zfs-tests-functional.yml delete mode 100644 .github/workflows/zfs-tests-sanity.yml delete mode 100644 .github/workflows/zloop.yml diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 000000000000..8255dd210821 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,51 @@ + +## The testings are done this way + +```mermaid +flowchart TB +subgraph CleanUp and Summary + Part1-20.04-->CleanUp+nice+Summary + Part2-20.04-->CleanUp+nice+Summary + PartN-20.04-->CleanUp+nice+Summary + Part1-22.04-->CleanUp+nice+Summary + Part2-22.04-->CleanUp+nice+Summary + PartN-22.04-->CleanUp+nice+Summary +end + +subgraph Functional Testings + functional-testing-20.04-->Part1-20.04 + functional-testing-20.04-->Part2-20.04 + functional-testing-20.04-->PartN-20.04 + functional-testing-22.04-->Part1-22.04 + functional-testing-22.04-->Part2-22.04 + functional-testing-22.04-->PartN-22.04 +end + +subgraph Sanity and zloop Testings + sanity-checks-20.04-->functional-testing-20.04 + sanity-checks-22.04-->functional-testing-22.04 + zloop-checks-20.04-->functional + zloop-checks-22.04-->functional +end + +subgraph Code Checking + Building + codeql.yml + checkstyle.yml + Build-Ubuntu-20.04-->sanity-checks-20.04 + Build-Ubuntu-22.04-->sanity-checks-22.04 + Build-Ubuntu-20.04-->zloop-checks-20.04 + Build-Ubuntu-22.04-->zloop-checks-22.04 +end +``` + + +1) build zfs modules for Ubuntu 20.04 and 22.04 (~15m) +2) 2x zloop test (~10m) + 2x sanity test (~25m) +3) functional testings in parts 1..5 (each ~1h) +4) cleanup and create summary + - content of summary depends on the results of the steps + +When everything runs fine, the full run should be done in +about 2 hours. + +The codeql.yml and checkstyle.yml are not part in this circle. diff --git a/.github/workflows/build-dependencies.txt b/.github/workflows/build-dependencies.txt index 73921865c42a..e26ca85174c7 100644 --- a/.github/workflows/build-dependencies.txt +++ b/.github/workflows/build-dependencies.txt @@ -2,8 +2,10 @@ acl alien attr autoconf +automake bc build-essential +bzip2 curl dbench debhelper-compat @@ -11,47 +13,38 @@ dh-python dkms fakeroot fio +gawk gdb -gdebi git ksh -lcov -libacl1-dev libaio-dev libattr1-dev libblkid-dev libcurl4-openssl-dev -libdevmapper-dev libelf-dev libffi-dev -libmount-dev libpam0g-dev -libselinux1-dev libssl-dev libtool libudev-dev -linux-headers-generic lsscsi mdadm nfs-kernel-server -pamtester parted -po-debconf +pax +pv python3 python3-all-dev python3-cffi python3-dev python3-packaging -python3-pip python3-setuptools python3-sphinx -rng-tools-debian -rsync +quota +rng-tools samba +selinux-utils sysstat +util-linux uuid-dev -watchdog -wget -xfslibs-dev -xz-utils zlib1g-dev diff --git a/.github/workflows/scripts/generate-summary.sh b/.github/workflows/scripts/generate-summary.sh new file mode 100755 index 000000000000..c4e1102b1a9b --- /dev/null +++ b/.github/workflows/scripts/generate-summary.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +set -eu + +ZFS_COLOR="scripts/zfs-tests-color.sh" +ZTS_REPORT="tests/test-runner/bin/zts-report.py" +chmod +x $ZTS_REPORT + +# all output goes to summary page +function generate() { + LOG="$1" + test -f $LOG || return + + # for overview and zts-resport + cat $LOG | grep '^Test: ' > list + + # error details + awk '/\[FAIL\]|\[KILLED\]/{ show=1; print; next; } + /\[SKIP\]|\[PASS\]/{ show=0; } show' $LOG > err + + # first the summary + echo -e "\n## $TEST\n" + if [ -s err ]; then + echo "
"
+    $ZTS_REPORT --no-maybes ./list
+    echo "
" + echo "
Error Listings
"
+    cat err
+    echo "
" + else + echo "No errors within these testings :thumbsup:" + fi + + # xxx: use stores step-id+output here (colors) + echo "
All Tests
"
+  cat list
+  echo "
" + rm -f err list +} + +function summarize() { + LOGDIR=$1 + TEST="$2" + echo "::group::Generating summary $LOGDIR" + for p in $LOGDIR/sanity.tar; do test -f $p && tar xf $p; done + generate sanity/log >> Summary.md + cat Summary.md >> $GITHUB_STEP_SUMMARY + rm -rf sanity + echo "::endgroup::" +} + +function summarize_parts() { + LOGDIR=$1 + TEST="$2" + echo "::group::Generating summary $LOGDIR" + # generate all in one files from the part ones + for p in $LOGDIR/part[123456789].tar; do + test -f $p && tar xf $p + done + for p in part[123456789]/log; do + test -f $p && cat $p >> log + done + generate log >> Summary.md + cat Summary.md >> $GITHUB_STEP_SUMMARY + rm -rf part* log + echo "::endgroup::" +} + +echo > Summary.md +summarize Logs-20.04-sanity "Sanity Tests Ubuntu 20.04" +summarize Logs-22.04-sanity "Sanity Tests Ubuntu 22.04" +summarize_parts Logs-20.04-functional "Functional Tests Ubuntu 20.04" +summarize_parts Logs-22.04-functional "Functional Tests Ubuntu 22.04" diff --git a/.github/workflows/scripts/reclaim_disk_space.sh b/.github/workflows/scripts/reclaim_disk_space.sh deleted file mode 100755 index ed23ce31d85c..000000000000 --- a/.github/workflows/scripts/reclaim_disk_space.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -eu - -# remove 4GiB of images -sudo systemd-run docker system prune --force --all --volumes - -# remove unused software -sudo systemd-run --wait rm -rf \ - "$AGENT_TOOLSDIRECTORY" \ - /opt/* \ - /usr/local/* \ - /usr/share/az* \ - /usr/share/dotnet \ - /usr/share/gradle* \ - /usr/share/miniconda \ - /usr/share/swift \ - /var/lib/gems \ - /var/lib/mysql \ - /var/lib/snapd - -# trim the cleaned space -sudo fstrim / diff --git a/.github/workflows/scripts/setup-dependencies.sh b/.github/workflows/scripts/setup-dependencies.sh new file mode 100755 index 000000000000..1a4743f42704 --- /dev/null +++ b/.github/workflows/scripts/setup-dependencies.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +set -eu + +function prerun() { + echo "::group::Install build dependencies" + # remove snap things, update+upgrade will be faster then + for x in lxd core20 snapd; do sudo snap remove $x; done + sudo apt-get purge snapd google-chrome-stable firefox + # https://github.com/orgs/community/discussions/47863 + sudo apt-get remove grub-efi-amd64-bin grub-efi-amd64-signed shim-signed --allow-remove-essential + sudo apt-get update + sudo apt upgrade + sudo xargs --arg-file=.github/workflows/build-dependencies.txt apt-get install -qq + sudo apt-get clean + sudo dmesg -c > /var/tmp/dmesg-prerun + echo "::endgroup::" +} + +function mod_build() { + echo "::group::Generate debian packages" + ./autogen.sh + ./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan + make --no-print-directory --silent native-deb-utils native-deb-kmod + mv ../*.deb . + rm ./openzfs-zfs-dracut*.deb ./openzfs-zfs-dkms*.deb + echo "$ImageOS-$ImageVersion" > tests/ImageOS.txt + echo "::endgroup::" +} + +function mod_install() { + # install the pre-built module only on the same runner image + MOD=`cat tests/ImageOS.txt` + if [ "$MOD" != "$ImageOS-$ImageVersion" ]; then + rm -f *.deb + mod_build + fi + + echo "::group::Install and load modules" + # delete kernel-shipped zfs modules, be sure about correct modules + sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf + sudo apt-get install --fix-missing ./*.deb + # our modules are in kernel/extra/zcommon/*.ko + sudo rm -rf /lib/modules/*/kernel/zfs/*.ko + sudo depmod -a + sudo modprobe zfs + sudo dmesg + sudo dmesg -c > /var/tmp/dmesg-module-load + echo "::endgroup::" + + echo "::group::Report CPU information" + lscpu + cat /proc/spl/kstat/zfs/chksum_bench + echo "::endgroup::" + + echo "::group::Reclaim and report disk space" + # remove 4GiB of images + sudo systemd-run docker system prune --force --all --volumes + + # remove unused software + sudo systemd-run --wait rm -rf \ + "$AGENT_TOOLSDIRECTORY" \ + /opt/* \ + /usr/local/* \ + /usr/share/az* \ + /usr/share/dotnet \ + /usr/share/gradle* \ + /usr/share/miniconda \ + /usr/share/swift \ + /var/lib/gems \ + /var/lib/mysql \ + /var/lib/snapd + + # trim the cleaned space + sudo fstrim / + + # disk usage afterwards + df -h / + echo "::endgroup::" +} + +case "$1" in + build) + prerun + mod_build + ;; + tests) + prerun + mod_install + ;; +esac diff --git a/.github/workflows/scripts/setup-functional.sh b/.github/workflows/scripts/setup-functional.sh new file mode 100755 index 000000000000..7d68fe200066 --- /dev/null +++ b/.github/workflows/scripts/setup-functional.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -eu + +TDIR="/usr/share/zfs/zfs-tests/tests/functional" +echo -n "TODO=" +case "$1" in + part1) + echo "cli_root" + ;; + part2) + ls $TDIR|grep '^[a-k]'|grep -v "cli_root"|xargs|tr -s ' ' ',' + ;; + part3) + ls $TDIR|grep '^[l-q]'|xargs|tr -s ' ' ',' + ;; + part4) + ls $TDIR|grep '^r[aeo]'|xargs|tr -s ' ' ',' + ;; + part5) + echo -n "rsend," + ls $TDIR|grep '^[s-z]'|xargs|tr -s ' ' ',' + ;; +esac diff --git a/.github/workflows/zfs-linux-tests.yml b/.github/workflows/zfs-linux-tests.yml new file mode 100644 index 000000000000..3825068a6c92 --- /dev/null +++ b/.github/workflows/zfs-linux-tests.yml @@ -0,0 +1,107 @@ +name: zfs-linux-tests + +on: + workflow_call: + inputs: + os: + description: 'The ubuntu version: 20.02 or 22.04' + required: true + type: string + +jobs: + zloop: + runs-on: ubuntu-${{ inputs.os }} + steps: + - uses: actions/download-artifact@v3 + with: + name: modules-${{ inputs.os }} + - name: Install modules + run: | + tar xzf modules-${{ inputs.os }}.tgz + .github/workflows/scripts/setup-dependencies.sh tests + - name: Tests + id: step-zloop + run: | + sudo mkdir -p /var/tmp/zloop + # run for 10 minutes or at most 2 iterations for a maximum runner + # time of 20 minutes. + sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60 + - name: Prepare artifacts + if: failure() + run: | + sudo chmod +r -R /var/tmp/zloop/ + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: Zpool-logs-${{ inputs.os }} + path: | + /var/tmp/zloop/*/ + !/var/tmp/zloop/*/vdev/ + if-no-files-found: ignore + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: Zpool-files-${{ inputs.os }} + path: | + /var/tmp/zloop/*/vdev/ + if-no-files-found: ignore + + sanity: + runs-on: ubuntu-${{ inputs.os }} + steps: + - uses: actions/download-artifact@v3 + with: + name: modules-${{ inputs.os }} + - name: Install modules + run: | + tar xzf modules-${{ inputs.os }}.tgz + .github/workflows/scripts/setup-dependencies.sh tests + - name: Tests + id: step-sanity + run: | + set -o pipefail + /usr/share/zfs/zfs-tests.sh -vKR -s 3G -r sanity | scripts/zfs-tests-color.sh + RESPATH="/var/tmp/test_results" + mv -f $RESPATH/current $RESPATH/sanity + tar cf $RESPATH/sanity.tar -h -C $RESPATH sanity + shell: bash + timeout-minutes: 120 + - uses: actions/upload-artifact@v3 + with: + name: Logs-${{ inputs.os }}-sanity + path: /var/tmp/test_results/sanity.tar + if-no-files-found: ignore + + functional: + runs-on: ubuntu-${{ inputs.os }} + strategy: + fail-fast: false + matrix: + tests: [ part1, part2, part3, part4, part5 ] + # needs: sanity + steps: + - uses: actions/download-artifact@v3 + with: + name: modules-${{ inputs.os }} + - name: Install modules + run: | + tar xzf modules-${{ inputs.os }}.tgz + .github/workflows/scripts/setup-dependencies.sh tests + - name: Setup tests + run: | + .github/workflows/scripts/setup-functional.sh ${{ matrix.tests }} >> $GITHUB_ENV + - name: Tests + id: step-functional + run: | + set -o pipefail + /usr/share/zfs/zfs-tests.sh -vKR -s 3G -T ${{ env.TODO }} | scripts/zfs-tests-color.sh + RESPATH="/var/tmp/test_results" + mv -f $RESPATH/current $RESPATH/${{ matrix.tests }} + tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH ${{ matrix.tests }} + shell: bash + timeout-minutes: 120 + - uses: actions/upload-artifact@v3 + with: + name: Logs-${{ inputs.os }}-functional + path: /var/tmp/test_results/${{ matrix.tests }}.tar + if-no-files-found: ignore diff --git a/.github/workflows/zfs-linux.yml b/.github/workflows/zfs-linux.yml new file mode 100644 index 000000000000..07c548855f0c --- /dev/null +++ b/.github/workflows/zfs-linux.yml @@ -0,0 +1,60 @@ +name: zfs-linux + +on: + push: + pull_request: + +jobs: + + build: + name: Build + 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: Build modules + run: .github/workflows/scripts/setup-dependencies.sh build + - name: Prepare modules upload + run: tar czf modules-${{ matrix.os }}.tgz *.deb .github scripts/zfs-tests-color.sh tests/test-runner + - uses: actions/upload-artifact@v3 + with: + name: modules-${{ matrix.os }} + path: modules-${{ matrix.os }}.tgz + + testings: + name: Testing + strategy: + fail-fast: false + matrix: + os: [20.04, 22.04] + needs: build + uses: ./.github/workflows/zfs-linux-tests.yml + with: + os: ${{ matrix.os }} + + cleanup: + if: ${{ always() }} + name: Cleanup + runs-on: ubuntu-22.04 + needs: testings + steps: + - uses: actions/download-artifact@v3 + - name: Summary of the testings + run: | + tar xzf modules-22.04/modules-22.04.tgz .github tests scripts + .github/workflows/scripts/generate-summary.sh + - uses: actions/upload-artifact@v3 + with: + name: Summary Markdown + path: Summary.md + - uses: geekyeggo/delete-artifact@v2 + with: + name: modules-20.04 + - uses: geekyeggo/delete-artifact@v2 + with: + name: modules-22.04 diff --git a/.github/workflows/zfs-tests-functional.yml b/.github/workflows/zfs-tests-functional.yml deleted file mode 100644 index 237a0cb73d0b..000000000000 --- a/.github/workflows/zfs-tests-functional.yml +++ /dev/null @@ -1,86 +0,0 @@ -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: | - ./autogen.sh - - name: Configure - run: | - ./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan - - name: Make - run: | - make --no-print-directory --silent native-deb-utils native-deb-kmod - mv ../*.deb . - rm ./openzfs-zfs-dkms*.deb ./openzfs-zfs-dracut*.deb - - name: Install - run: | - # 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 dpkg -i *.deb - # Native Debian packages enable and start the services - # Stop zfs-zed daemon, as it may interfere with some ZTS test cases - sudo systemctl stop zfs-zed - # 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: | - set -o pipefail - /usr/share/zfs/zfs-tests.sh -vKR -s 3G | scripts/zfs-tests-color.sh - shell: bash - 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 diff --git a/.github/workflows/zfs-tests-sanity.yml b/.github/workflows/zfs-tests-sanity.yml deleted file mode 100644 index ef2c0a8695a7..000000000000 --- a/.github/workflows/zfs-tests-sanity.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: zfs-tests-sanity - -on: - push: - pull_request: - -jobs: - tests: - runs-on: ubuntu-22.04 - 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: | - ./autogen.sh - - name: Configure - run: | - ./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan - - name: Make - run: | - make --no-print-directory --silent native-deb-utils native-deb-kmod - mv ../*.deb . - rm ./openzfs-zfs-dkms*.deb ./openzfs-zfs-dracut*.deb - - name: Install - run: | - # 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 dpkg -i *.deb - # Native Debian packages enable and start the services - # Stop zfs-zed daemon, as it may interfere with some ZTS test cases - sudo systemctl stop zfs-zed - # 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: | - set -o pipefail - /usr/share/zfs/zfs-tests.sh -vKR -s 3G -r sanity | scripts/zfs-tests-color.sh - shell: bash - 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 diff --git a/.github/workflows/zloop.yml b/.github/workflows/zloop.yml deleted file mode 100644 index 8333a88de6e3..000000000000 --- a/.github/workflows/zloop.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: zloop - -on: - push: - pull_request: - -jobs: - tests: - runs-on: ubuntu-22.04 - env: - TEST_DIR: /var/tmp/zloop - 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: | - ./autogen.sh - - name: Configure - run: | - ./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan - - name: Make - run: | - make -j$(nproc) --no-print-directory --silent 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 - - name: Tests - run: | - sudo mkdir -p $TEST_DIR - # run for 10 minutes or at most 2 iterations for a maximum runner - # time of 20 minutes. - sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60 - - name: Prepare artifacts - if: failure() - run: | - sudo chmod +r -R $TEST_DIR/ - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: Logs - path: | - /var/tmp/zloop/*/ - !/var/tmp/zloop/*/vdev/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: Pool files - path: | - /var/tmp/zloop/*/vdev/ - if-no-files-found: ignore