Skip to content

Commit

Permalink
ci: run the integration tests on more distributions
Browse files Browse the repository at this point in the history
Add OpenSuse and Arch Linux to limited tests.

Only run the full tests against the latest stable Fedora version
to reduce the workload.

Also remove the `hung_task_panic=1` on the kernel command line, as qemu
tends to be really slow in non-kvm mode.
  • Loading branch information
haraldh committed May 14, 2021
1 parent 12d0213 commit b2cf61d
Show file tree
Hide file tree
Showing 22 changed files with 112 additions and 113 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/fedora.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Integration Test

on:
pull_request:
branches: [ master ]

jobs:
basic:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:33",
"fedora:rawhide",
"opensuse:latest",
"arch:latest",
]
test: [
"04",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
test:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:latest",
]
test: [
"01",
"02",
"03",
"04",
"10",
"11",
"12",
"13",
"14",
"15",
"17",
"20",
"21",
"30",
"31",
"35",
"36",
"40",
"41",
"98",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
2 changes: 1 addition & 1 deletion test/TEST-01-BASIC/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_run() {
"$testdir"/run-qemu \
"${disk_args[@]}" \
-watchdog i6300esb -watchdog-action poweroff \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot \"root=LABEL= rdinit=/bin/sh\" rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot \"root=LABEL= rdinit=/bin/sh\" rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-02-SYSTEMD/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-03-USR-MOUNT/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ client_run() {
"$testdir"/run-qemu \
"${disk_args[@]}" \
-watchdog i6300esb -watchdog-action poweroff \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts loglevel=7 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts loglevel=7 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-04-FULL-SYSTEMD/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ client_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-10-RAID/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-11-LVM/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-12-RAID-DEG/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ client_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot $* systemd.log_target=kmsg root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.shell=0 $DEBUGFAIL " \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot $* systemd.log_target=kmsg root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.shell=0 $DEBUGFAIL " \
-initrd "$TESTDIR"/initramfs.testing

if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
Expand Down
6 changes: 3 additions & 3 deletions test/TEST-13-ENC-RAID-LVM/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing
grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
echo "CLIENT TEST END: [OK]"
Expand All @@ -36,7 +36,7 @@ test_run() {
echo "CLIENT TEST START: Any LUKS"
"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing
grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
echo "CLIENT TEST END: [OK]"
Expand All @@ -46,7 +46,7 @@ test_run() {
echo "CLIENT TEST START: Wrong LUKS UUID"
"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
-initrd "$TESTDIR"/initramfs.testing
grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img && return 1
echo "CLIENT TEST END: [OK]"
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-14-IMSM/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ client_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1

if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-15-BTRFSRAID/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing
grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
}
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-16-DMSQUASH/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test_run() {
"$testdir"/run-qemu \
"${disk_args[@]}" \
-boot order=d \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing

# mediacheck test with qemu GUI
Expand Down
2 changes: 1 addition & 1 deletion test/TEST-17-LVM-THIN/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test_run() {

"$testdir"/run-qemu \
"${disk_args[@]}" \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1
grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
}
Expand Down
4 changes: 2 additions & 2 deletions test/TEST-20-NFS/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ run_server() {
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-serial "${SERIAL:-"file:$TESTDIR/server.log"}" \
-watchdog i6300esb -watchdog-action poweroff \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 root=LABEL=dracut rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-append "panic=1 oops=panic softlockup_panic=1 root=LABEL=dracut rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
chmod 644 "$TESTDIR"/server.pid || return 1
Expand Down Expand Up @@ -79,7 +79,7 @@ client_test() {
-net nic,macaddr="$mac",model=e1000 \
-net socket,connect=127.0.0.1:12320 \
-watchdog i6300esb -watchdog-action poweroff \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=10 quiet ro console=ttyS0,115200n81 selinux=0" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=10 quiet ro console=ttyS0,115200n81 selinux=0" \
-initrd "$TESTDIR"/initramfs.testing

# shellcheck disable=SC2181
Expand Down
4 changes: 2 additions & 2 deletions test/TEST-30-ISCSI/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ run_server() {
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
-net socket,listen=127.0.0.1:12330 \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 quiet root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-append "panic=1 oops=panic softlockup_panic=1 quiet root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
chmod 644 "$TESTDIR"/server.pid || return 1
Expand Down Expand Up @@ -74,7 +74,7 @@ run_client() {
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
-net socket,connect=127.0.0.1:12330 \
-acpitable file=ibft.table \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
-initrd "$TESTDIR"/initramfs.testing

# shellcheck disable=SC2181
Expand Down
4 changes: 2 additions & 2 deletions test/TEST-35-ISCSI-MULTI/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ run_server() {
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
-net socket,listen=127.0.0.1:12331 \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
chmod 644 "$TESTDIR"/server.pid || return 1
Expand Down Expand Up @@ -72,7 +72,7 @@ run_client() {
-net nic,macaddr=52:54:00:12:34:00,model=e1000 \
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
-net socket,connect=127.0.0.1:12331 \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
-initrd "$TESTDIR"/initramfs.testing
if ! grep -U --binary-files=binary -F -m 1 -q iscsi-OK "$TESTDIR"/marker.img; then
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
Expand Down
4 changes: 2 additions & 2 deletions test/TEST-40-NBD/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ run_server() {
-serial "${SERIAL:-"file:$TESTDIR/server.log"}" \
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net socket,listen=127.0.0.1:12340 \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 rd.luks=0 systemd.crash_reboot quiet root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-append "panic=1 oops=panic softlockup_panic=1 rd.luks=0 systemd.crash_reboot quiet root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
chmod 644 "$TESTDIR"/server.pid || return 1
Expand Down Expand Up @@ -91,7 +91,7 @@ client_test() {
"${disk_args[@]}" \
-net nic,macaddr="$mac",model=e1000 \
-net socket,connect=127.0.0.1:12340 \
-append "panic=1 hung_task_panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \
-initrd "$TESTDIR"/initramfs.testing

# shellcheck disable=SC2181
Expand Down
Loading

0 comments on commit b2cf61d

Please sign in to comment.