diff --git a/.github/tools/run_mdadm_tests.sh b/.github/tools/run_mdadm_tests.sh new file mode 100755 index 00000000..a4513a46 --- /dev/null +++ b/.github/tools/run_mdadm_tests.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash + +sudo make clean +sudo make -j$(nproc) +sudo make install +sudo mdadm -Ss +sudo ./test setup +sudo ./test --skip-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going +sudo ./test cleanup \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..6575c734 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: review +on: + pull_request: + paths: + - '*.c' + - '*.h' +jobs: + upstream_tests: + if: ${{ github.repository == 'md-raid-utilities/mdadm' }} + runs-on: self-hosted + timeout-minutes: 120 + name: upstream tests + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: 'Prepare machine' + run: | + cd .. + vagrant halt + vagrant status + vagrant up + - name: 'Run tests' + run: | + cd .. + vagrant ssh -c "cd /home/vagrant/host/mdadm && .github/tools/run_mdadm_tests.sh" + - name: "Save artifacts" + uses: actions/upload-artifact@v4 + with: + name: "Logs from failed tests" + path: /var/tmp/fail*.log + cleanup: + runs-on: self-hosted + steps: + - name: Restore clean VM + run: | + cd .. + vagrant ssh -c "sudo mdadm -Ss" + vagrant halt + diff --git a/tests/07layouts.broken b/tests/07layouts.broken new file mode 100644 index 00000000..f6d69773 --- /dev/null +++ b/tests/07layouts.broken @@ -0,0 +1 @@ +always fails \ No newline at end of file diff --git a/tests/07reshape5intr.broken b/tests/07reshape5intr.broken new file mode 100644 index 00000000..54daddd6 --- /dev/null +++ b/tests/07reshape5intr.broken @@ -0,0 +1,3 @@ +always fails + +hangs \ No newline at end of file diff --git a/tests/14imsm-r5_3d-migrate-r4_3d.broken b/tests/14imsm-r5_3d-migrate-r4_3d.broken new file mode 100644 index 00000000..f6d69773 --- /dev/null +++ b/tests/14imsm-r5_3d-migrate-r4_3d.broken @@ -0,0 +1 @@ +always fails \ No newline at end of file