From: Harald Hoyer Date: Fri, 28 Feb 2020 07:39:31 +0000 (+0100) Subject: test: run-qemu refactor common qemu parameters X-Git-Tag: 050~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77537bf2d7ff7b37b1013a2b2eb1ef8cd6a247d7;p=thirdparty%2Fdracut.git test: run-qemu refactor common qemu parameters --- diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh index db25e5a43..37f77c365 100755 --- a/test/TEST-01-BASIC/test.sh +++ b/test/TEST-01-BASIC/test.sh @@ -11,10 +11,7 @@ test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/result \ - -m 512M -smp 2 -nographic \ - -net none \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 systemd.crash_reboot root=LABEL=dracut 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 -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 @@ -80,7 +77,6 @@ test_setup() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh index 6fcd52a11..a08bfe5ce 100755 --- a/test/TEST-02-SYSTEMD/test.sh +++ b/test/TEST-02-SYSTEMD/test.sh @@ -8,9 +8,6 @@ KVERSION="${KVERSION-$(uname -r)}" test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 @@ -77,7 +74,6 @@ test_setup() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh index dfe331488..5943c5c60 100755 --- a/test/TEST-03-USR-MOUNT/test.sh +++ b/test/TEST-03-USR-MOUNT/test.sh @@ -18,10 +18,7 @@ client_run() { -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ - -m 512M -smp 2 -nographic \ - -net none \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing @@ -115,7 +112,6 @@ test_setup() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 if ! grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs; then diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh index e6a2910c4..4114070a3 100755 --- a/test/TEST-04-FULL-SYSTEMD/test.sh +++ b/test/TEST-04-FULL-SYSTEMD/test.sh @@ -20,9 +20,6 @@ client_run() { -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 @@ -253,7 +250,6 @@ EOF $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 if ! grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs; then diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index 84fa58d15..fd92606b4 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -10,9 +10,6 @@ test_run() { DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 @@ -77,7 +74,6 @@ test_setup() { # Invoke KVM and/or QEMU to actually create the target filesystem. $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh index 98daf4715..95463e4b8 100755 --- a/test/TEST-11-LVM/test.sh +++ b/test/TEST-11-LVM/test.sh @@ -9,9 +9,6 @@ KVERSION=${KVERSION-$(uname -r)} test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 @@ -72,7 +69,7 @@ test_setup() { -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 rm -rf -- $TESTDIR/overlay # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 512M -smp 2 -nographic -net none \ + $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh index 7f0188c3c..d6b29ddec 100755 --- a/test/TEST-12-RAID-DEG/test.sh +++ b/test/TEST-12-RAID-DEG/test.sh @@ -15,11 +15,9 @@ client_run() { cp --sparse=always --reflink=auto $TESTDIR/disk3.img $TESTDIR/disk3.img.new $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 512M -nographic -smp 2 \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img.new \ -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \ - -net none \ - -no-reboot \ -append "panic=1 systemd.crash_reboot $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \ -initrd $TESTDIR/initramfs.testing if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then @@ -117,7 +115,6 @@ test_setup() { -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1.img \ -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img \ -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh index 9a9cb8840..1f311be52 100755 --- a/test/TEST-13-ENC-RAID-LVM/test.sh +++ b/test/TEST-13-ENC-RAID-LVM/test.sh @@ -17,9 +17,6 @@ test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 1024M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 @@ -31,9 +28,6 @@ test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 1024M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 @@ -45,9 +39,6 @@ test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 1024M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 @@ -111,7 +102,7 @@ test_setup() { -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 rm -rf -- $TESTDIR/overlay # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 512M -smp 2 -nographic -net none \ + $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh index 03406c9bc..75ea587f8 100755 --- a/test/TEST-14-IMSM/test.sh +++ b/test/TEST-14-IMSM/test.sh @@ -13,9 +13,6 @@ client_run() { -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1 \ -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2 \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then @@ -109,7 +106,6 @@ test_setup() { -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1 \ -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2 \ - -m 512M -nographic -net none \ -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh index 8c1541437..873b779a7 100755 --- a/test/TEST-15-BTRFSRAID/test.sh +++ b/test/TEST-15-BTRFSRAID/test.sh @@ -12,9 +12,6 @@ test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$MARKER_DISKIMAGE \ -drive format=raw,index=1,media=disk,file=$DISKIMAGE \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 -F -m 1 -q dracut-root-block-success $MARKER_DISKIMAGE || return 1 @@ -81,7 +78,6 @@ test_setup() { # Invoke KVM and/or QEMU to actually create the target filesystem. $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 512M -smp 2 -nographic -net none \ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh index 0af7a8a33..37a963e2b 100755 --- a/test/TEST-16-DMSQUASH/test.sh +++ b/test/TEST-16-DMSQUASH/test.sh @@ -22,10 +22,6 @@ test_run() { -boot order=d \ -drive format=raw,bps=1000000,index=0,media=disk,file="$TESTDIR"/livecd.iso \ -drive format=raw,index=1,media=disk,file="$TESTDIR"/root.img \ - -m 512M -smp 2 \ - -nographic \ - -net none \ - -no-reboot \ -append "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 diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh index 07796147b..fb7b817c3 100755 --- a/test/TEST-17-LVM-THIN/test.sh +++ b/test/TEST-17-LVM-THIN/test.sh @@ -9,9 +9,6 @@ KVERSION=${KVERSION-$(uname -r)} test_run() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -m 512M -smp 2 -nographic \ - -net none \ - -no-reboot \ -append "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 grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 @@ -72,7 +69,7 @@ test_setup() { -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 rm -rf -- $TESTDIR/overlay # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 512M -smp 2 -nographic -net none \ + $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh index 3308e652b..66926103a 100755 --- a/test/TEST-20-NFS/test.sh +++ b/test/TEST-20-NFS/test.sh @@ -17,14 +17,11 @@ run_server() { fsck -a $TESTDIR/server.ext3 || return 1 $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext3 \ - -m 512M -smp 2 \ - -display none \ -net socket,listen=127.0.0.1:12320 \ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ ${SERIAL:+-serial "$SERIAL"} \ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 quiet root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.server \ -pidfile $TESTDIR/server.pid -daemonize || return 1 @@ -63,11 +60,9 @@ client_test() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ - -m 512M -smp 2 -nographic \ -net nic,macaddr=$mac,model=e1000 \ -net socket,connect=127.0.0.1:12320 \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=10 quiet ro console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.testing diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh index 3d9d90045..400d5c80c 100755 --- a/test/TEST-30-ISCSI/test.sh +++ b/test/TEST-30-ISCSI/test.sh @@ -18,14 +18,11 @@ run_server() { -drive format=raw,index=1,media=disk,file=$TESTDIR/root.ext3 \ -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ - -m 512M -smp 2 \ - -display none \ ${SERIAL:+-serial "$SERIAL"} \ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ -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 \ - -no-reboot \ -append "panic=1 quiet root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ -initrd $TESTDIR/initramfs.server \ -pidfile $TESTDIR/server.pid -daemonize || return 1 @@ -55,11 +52,9 @@ run_client() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ - -m 512M -smp 2 -nographic \ -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:12330 \ - -no-reboot \ -acpitable file=ibft.table \ -append "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 @@ -187,7 +182,6 @@ test_setup() { -drive format=raw,index=1,media=disk,file=$TESTDIR/client.img \ -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ - -smp 2 -m 512M -nographic -net none \ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh index a0b7ccc4f..4e1eba973 100755 --- a/test/TEST-31-ISCSI-MULTI/test.sh +++ b/test/TEST-31-ISCSI-MULTI/test.sh @@ -18,14 +18,11 @@ run_server() { -drive format=raw,index=1,media=disk,file=$TESTDIR/root.ext3 \ -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ - -m 512M -smp 2 \ - -display none \ ${SERIAL:+-serial "$SERIAL"} \ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ -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 \ - -no-reboot \ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ -initrd $TESTDIR/initramfs.server \ -pidfile $TESTDIR/server.pid -daemonize || return 1 @@ -54,11 +51,9 @@ run_client() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ - -m 512M -smp 2 -nographic \ -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 \ - -no-reboot \ -append "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 -F -m 1 -q iscsi-OK $TESTDIR/client.img; then @@ -201,7 +196,6 @@ test_setup() { -drive format=raw,index=1,media=disk,file=$TESTDIR/client.img \ -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ - -smp 2 -m 512M -nographic -net none \ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh index 45f76c926..75820cbb7 100755 --- a/test/TEST-40-NBD/test.sh +++ b/test/TEST-40-NBD/test.sh @@ -33,13 +33,10 @@ run_server() { -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext2 \ -drive format=raw,index=1,media=disk,file=$TESTDIR/nbd.ext2 \ -drive format=raw,index=2,media=disk,file=$TESTDIR/encrypted.ext2 \ - -m 512M -smp 2 \ - -display none \ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ -net socket,listen=127.0.0.1:12340 \ ${SERIAL:+-serial "$SERIAL"} \ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ - -no-reboot \ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1 chmod 644 $TESTDIR/server.pid || return 1 @@ -80,11 +77,8 @@ client_test() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/flag.img \ - -m 512M -smp 2 \ - -nographic \ -net nic,macaddr=$mac,model=e1000 \ -net socket,connect=127.0.0.1:12340 \ - -no-reboot \ -append "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 @@ -279,8 +273,6 @@ make_encrypted_root() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file=$TESTDIR/flag.img \ -drive format=raw,index=1,media=disk,file=$TESTDIR/encrypted.ext2 \ - -m 512M -smp 2\ - -nographic -net none \ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -F -m 1 -q dracut-root-block-created $TESTDIR/flag.img || return 1 diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh index 0720c4f2b..26e30561a 100755 --- a/test/TEST-50-MULTINIC/test.sh +++ b/test/TEST-50-MULTINIC/test.sh @@ -15,14 +15,11 @@ run_server() { $testdir/run-qemu \ -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ - -m 512M -smp 2 \ - -display none \ -net socket,listen=127.0.0.1:12350 \ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ ${SERIAL:+-serial "$SERIAL"} \ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ -initrd "$TESTDIR"/initramfs.server \ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 @@ -60,7 +57,7 @@ client_test() { return 1 fi - $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ + $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img \ -net socket,connect=127.0.0.1:12350 \ -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ @@ -70,7 +67,6 @@ client_test() { -device e1000,netdev=n1,mac=52:54:00:12:34:98 \ -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ -initrd "$TESTDIR"/initramfs.testing diff --git a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh index 2afeb15dc..0b6b7b484 100755 --- a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh +++ b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh @@ -17,8 +17,6 @@ run_server() { $testdir/run-qemu \ -hda "$TESTDIR"/server.ext3 \ - -m 512M -smp 2 \ - -display none \ -netdev socket,id=n0,listen=127.0.0.1:12370 \ -netdev socket,id=n1,listen=127.0.0.1:12371 \ -netdev socket,id=n2,listen=127.0.0.1:12372 \ @@ -30,7 +28,6 @@ run_server() { ${SERIAL:+-serial "$SERIAL"} \ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \ -initrd "$TESTDIR"/initramfs.server \ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 @@ -77,7 +74,7 @@ client_test() { if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then $testdir/run-qemu \ - -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ + -hda "$TESTDIR"/client.img \ -netdev socket,connect=127.0.0.1:12370,id=s1 \ -netdev hubport,hubid=1,id=h1,netdev=s1 \ -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \ @@ -86,12 +83,11 @@ client_test() { -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \ $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 $cmdline systemd.crash_reboot rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ -initrd "$TESTDIR"/initramfs.testing else $testdir/run-qemu \ - -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ + -hda "$TESTDIR"/client.img \ -net socket,vlan=0,connect=127.0.0.1:12370 \ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12371} \ -net socket,vlan=2,connect=127.0.0.1:12372 \ @@ -102,7 +98,6 @@ client_test() { -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \ -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -append "panic=1 $cmdline systemd.crash_reboot rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ -initrd "$TESTDIR"/initramfs.testing fi diff --git a/test/run-qemu b/test/run-qemu index ddf31490c..4859bab87 100755 --- a/test/run-qemu +++ b/test/run-qemu @@ -3,12 +3,12 @@ # We prefer kvm, kqemu, userspace in that order. export PATH=/sbin:/bin:/usr/sbin:/usr/bin -[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS="" +[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS="-cpu max" $(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS="-kernel-kqemu -cpu host" [[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS="-cpu host" [[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS="-cpu host" [[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS="-cpu host" -[[ -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="" +[[ -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="-cpu max" [[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="-enable-kvm -cpu host" [[ $BIN ]] || { @@ -17,8 +17,8 @@ $(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS="-kernel-kqemu -cpu ho exit 1 } -# Provide rng device sourcing the hosts /dev/urandom -ARGS="$ARGS -device virtio-rng-pci" +# Provide rng device sourcing the hosts /dev/urandom and other standard parameters +ARGS="$ARGS -smp 2 -m 512 -nodefaults -vga none -display none -no-reboot -device virtio-rng-pci" KVERSION=${KVERSION-$(uname -r)}