]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: run-qemu refactor common qemu parameters
authorHarald Hoyer <harald@redhat.com>
Fri, 28 Feb 2020 07:39:31 +0000 (08:39 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 28 Feb 2020 07:39:31 +0000 (08:39 +0100)
19 files changed:
test/TEST-01-BASIC/test.sh
test/TEST-02-SYSTEMD/test.sh
test/TEST-03-USR-MOUNT/test.sh
test/TEST-04-FULL-SYSTEMD/test.sh
test/TEST-10-RAID/test.sh
test/TEST-11-LVM/test.sh
test/TEST-12-RAID-DEG/test.sh
test/TEST-13-ENC-RAID-LVM/test.sh
test/TEST-14-IMSM/test.sh
test/TEST-15-BTRFSRAID/test.sh
test/TEST-16-DMSQUASH/test.sh
test/TEST-17-LVM-THIN/test.sh
test/TEST-20-NFS/test.sh
test/TEST-30-ISCSI/test.sh
test/TEST-31-ISCSI-MULTI/test.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/test.sh
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
test/run-qemu

index db25e5a43bf7af0210d559f2723dc1ca185b6d27..37f77c3652fec942bd2900857d2385138a89d76b 100755 (executable)
@@ -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
index 6fcd52a11e9a10e2a9308f5554e0e29e86b650cb..a08bfe5ce204c95ea1fcfb3d635fb10e23ca5e8f 100755 (executable)
@@ -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
index dfe331488a4d98c6bbc26e08d051d1d309a252cd..5943c5c6067be272ee34c75a3203e646ae4e6b0b 100755 (executable)
@@ -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
index e6a2910c4f4f3125841de217818adcb061f45908..4114070a3b357629b460b31ad674eecffb6d1c6f 100755 (executable)
@@ -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
index 84fa58d1576a88e3eff5867a39a5abd787505636..fd92606b447c6707665c1733389771fdbfd08034 100755 (executable)
@@ -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
index 98daf4715b65c5681871e3ef8507da0e4d170b15..95463e4b8b765b8046c34268d68ad7df3900a233 100755 (executable)
@@ -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
index 7f0188c3ce2e16fb91b3189864b519d5aee3c2bc..d6b29ddec6697dca815776805009fadc17dcd43d 100755 (executable)
@@ -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
 
index 9a9cb8840ba8c4a83693fdd3851b994be6be149e..1f311be5250549b797e9487b6c365b0db6c37990 100755 (executable)
@@ -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
index 03406c9bc74f035ab42441731f03e2c5f0f44948..75ea587f847951868cfb08e59dc19f56de399601 100755 (executable)
@@ -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
index 8c1541437f59741611ab8202c17fa6478ecc48f0..873b779a7d4c72b294c286a4a04c79cdb3e1dbd7 100755 (executable)
@@ -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
 
index 0af7a8a33d8eab0bbecf3e3a6cc60d564422851b..37a963e2bf7992e6d05993a2ab628070aaab8921 100755 (executable)
@@ -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
 
index 07796147b40302acf02f0929351d60404dbc0f9c..fb7b817c3a4eef3a2d4320fbfa5970a9440b27c2 100755 (executable)
@@ -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
index 3308e652bdbaba28c67d90739c3a4ee50c5b112c..66926103a0fb9b92fbc901d216a34e6f96c060f5 100755 (executable)
@@ -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
 
index 3d9d90045d1b0eae0d120ab90054322998d94529..400d5c80cfb28b420cf918fc5db0799194da710e 100755 (executable)
@@ -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
index a0b7ccc4f87af545892964098010a341750e761b..4e1eba9736cfae2ad7209be3ea922f7086906acd 100755 (executable)
@@ -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
index 45f76c926cb74e8912070ed565f8eab6f04559b4..75820cbb7ea7d92022d98d56258b064735012a2e 100755 (executable)
@@ -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
index 0720c4f2b8dda7667c7af1cbcd70c91849406d34..26e30561a2fd1a8e19272d0c319ddc6b51911de7 100755 (executable)
@@ -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
 
index 2afeb15dc5e60f89cd7fb19ec03d239ff6f4f519..0b6b7b4841bb47496ef02e4c025e0917abb6da6d 100755 (executable)
@@ -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
index ddf31490cd0d487f7a11eb941da1ea30a336d74a..4859bab87cfe073b4d4e1210841619af706fc2c4 100755 (executable)
@@ -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)}