$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
$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
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
$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
-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
$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
-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
$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
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
# 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
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
-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
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
-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
$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
$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
$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
-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
-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
-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
$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
# 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
-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
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
-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
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
$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
-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
$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
-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
-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
$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
-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
-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
$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
$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
$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
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 \
-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
$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 \
${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
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 \
-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 \
-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
# 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 ]] || {
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)}