Browse Source

Revert "test: run-qemu refactor common qemu parameters"

This reverts commit 77537bf2d7.

Sorry, for the noise!
master
Harald Hoyer 4 years ago
parent
commit
4b60a34715
  1. 4
      test/TEST-01-BASIC/test.sh
  2. 4
      test/TEST-02-SYSTEMD/test.sh
  3. 4
      test/TEST-03-USR-MOUNT/test.sh
  4. 4
      test/TEST-04-FULL-SYSTEMD/test.sh
  5. 4
      test/TEST-10-RAID/test.sh
  6. 5
      test/TEST-11-LVM/test.sh
  7. 5
      test/TEST-12-RAID-DEG/test.sh
  8. 11
      test/TEST-13-ENC-RAID-LVM/test.sh
  9. 4
      test/TEST-14-IMSM/test.sh
  10. 4
      test/TEST-15-BTRFSRAID/test.sh
  11. 4
      test/TEST-16-DMSQUASH/test.sh
  12. 5
      test/TEST-17-LVM-THIN/test.sh
  13. 5
      test/TEST-20-NFS/test.sh
  14. 6
      test/TEST-30-ISCSI/test.sh
  15. 6
      test/TEST-31-ISCSI-MULTI/test.sh
  16. 8
      test/TEST-40-NBD/test.sh
  17. 6
      test/TEST-50-MULTINIC/test.sh
  18. 9
      test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
  19. 8
      test/run-qemu

4
test/TEST-01-BASIC/test.sh

@ -11,7 +11,10 @@ test_run() { @@ -11,7 +11,10 @@ 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
@ -77,6 +80,7 @@ test_setup() { @@ -77,6 +80,7 @@ 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

4
test/TEST-02-SYSTEMD/test.sh

@ -8,6 +8,9 @@ KVERSION="${KVERSION-$(uname -r)}" @@ -8,6 +8,9 @@ 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
@ -74,6 +77,7 @@ test_setup() { @@ -74,6 +77,7 @@ 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

4
test/TEST-03-USR-MOUNT/test.sh

@ -18,7 +18,10 @@ client_run() { @@ -18,7 +18,10 @@ 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

@ -112,6 +115,7 @@ test_setup() { @@ -112,6 +115,7 @@ 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

4
test/TEST-04-FULL-SYSTEMD/test.sh

@ -20,6 +20,9 @@ client_run() { @@ -20,6 +20,9 @@ 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

@ -250,6 +253,7 @@ EOF @@ -250,6 +253,7 @@ 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

4
test/TEST-10-RAID/test.sh

@ -10,6 +10,9 @@ test_run() { @@ -10,6 +10,9 @@ 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
@ -74,6 +77,7 @@ test_setup() { @@ -74,6 +77,7 @@ 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

5
test/TEST-11-LVM/test.sh

@ -9,6 +9,9 @@ KVERSION=${KVERSION-$(uname -r)} @@ -9,6 +9,9 @@ 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
@ -69,7 +72,7 @@ test_setup() { @@ -69,7 +72,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 \
$testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -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
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1

5
test/TEST-12-RAID-DEG/test.sh

@ -15,9 +15,11 @@ client_run() { @@ -15,9 +15,11 @@ 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 \
-drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 512M -nographic -smp 2 \
-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
@ -115,6 +117,7 @@ test_setup() { @@ -115,6 +117,7 @@ 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


11
test/TEST-13-ENC-RAID-LVM/test.sh

@ -17,6 +17,9 @@ test_run() { @@ -17,6 +17,9 @@ 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
@ -28,6 +31,9 @@ test_run() { @@ -28,6 +31,9 @@ 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
@ -39,6 +45,9 @@ test_run() { @@ -39,6 +45,9 @@ 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
@ -102,7 +111,7 @@ test_setup() { @@ -102,7 +111,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 \
$testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -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
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1

4
test/TEST-14-IMSM/test.sh

@ -13,6 +13,9 @@ client_run() { @@ -13,6 +13,9 @@ 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
@ -106,6 +109,7 @@ test_setup() { @@ -106,6 +109,7 @@ 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

4
test/TEST-15-BTRFSRAID/test.sh

@ -12,6 +12,9 @@ test_run() { @@ -12,6 +12,9 @@ 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
@ -78,6 +81,7 @@ test_setup() { @@ -78,6 +81,7 @@ 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


4
test/TEST-16-DMSQUASH/test.sh

@ -22,6 +22,10 @@ test_run() { @@ -22,6 +22,10 @@ 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


5
test/TEST-17-LVM-THIN/test.sh

@ -9,6 +9,9 @@ KVERSION=${KVERSION-$(uname -r)} @@ -9,6 +9,9 @@ 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
@ -69,7 +72,7 @@ test_setup() { @@ -69,7 +72,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 \
$testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -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
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1

5
test/TEST-20-NFS/test.sh

@ -17,11 +17,14 @@ run_server() { @@ -17,11 +17,14 @@ 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
@ -60,9 +63,11 @@ client_test() { @@ -60,9 +63,11 @@ 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


6
test/TEST-30-ISCSI/test.sh

@ -18,11 +18,14 @@ run_server() { @@ -18,11 +18,14 @@ 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
@ -52,9 +55,11 @@ run_client() { @@ -52,9 +55,11 @@ 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
@ -182,6 +187,7 @@ test_setup() { @@ -182,6 +187,7 @@ 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

6
test/TEST-31-ISCSI-MULTI/test.sh

@ -18,11 +18,14 @@ run_server() { @@ -18,11 +18,14 @@ 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
@ -51,9 +54,11 @@ run_client() { @@ -51,9 +54,11 @@ 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
@ -196,6 +201,7 @@ test_setup() { @@ -196,6 +201,7 @@ 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

8
test/TEST-40-NBD/test.sh

@ -33,10 +33,13 @@ run_server() { @@ -33,10 +33,13 @@ 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
@ -77,8 +80,11 @@ client_test() { @@ -77,8 +80,11 @@ 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

@ -273,6 +279,8 @@ make_encrypted_root() { @@ -273,6 +279,8 @@ 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

6
test/TEST-50-MULTINIC/test.sh

@ -15,11 +15,14 @@ run_server() { @@ -15,11 +15,14 @@ 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
@ -57,7 +60,7 @@ client_test() { @@ -57,7 +60,7 @@ client_test() {
return 1
fi

$testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img \
$testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \
-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 \
@ -67,6 +70,7 @@ client_test() { @@ -67,6 +70,7 @@ 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


9
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh

@ -17,6 +17,8 @@ run_server() { @@ -17,6 +17,8 @@ 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 \
@ -28,6 +30,7 @@ run_server() { @@ -28,6 +30,7 @@ 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
@ -74,7 +77,7 @@ client_test() { @@ -74,7 +77,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 \
-hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \
-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 \
@ -83,11 +86,12 @@ client_test() { @@ -83,11 +86,12 @@ 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 \
-hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \
-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 \
@ -98,6 +102,7 @@ client_test() { @@ -98,6 +102,7 @@ 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

8
test/run-qemu

@ -3,12 +3,12 @@ @@ -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="-cpu max"
[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS=""
$(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="-cpu max"
[[ -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS=""
[[ -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 @@ -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 and other standard parameters
ARGS="$ARGS -smp 2 -m 512 -nodefaults -vga none -display none -no-reboot -device virtio-rng-pci"
# Provide rng device sourcing the hosts /dev/urandom
ARGS="$ARGS -device virtio-rng-pci"

KVERSION=${KVERSION-$(uname -r)}


Loading…
Cancel
Save