From: Harald Hoyer Date: Wed, 18 Nov 2015 09:17:04 +0000 (+0100) Subject: TEST-16-DMSQUASH: add code for IO throtteling in qemu X-Git-Tag: 044~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90ac2d242964d08b70b12598c454be4146b0bcf9;p=thirdparty%2Fdracut.git TEST-16-DMSQUASH: add code for IO throtteling in qemu To test the mediacheck feature, I added commented out code with qemu IO throtteling. --- diff --git a/test/TEST-16-DMSQUASH/test-init.sh b/test/TEST-16-DMSQUASH/test-init.sh index cdbd4dd0e..206298da7 100755 --- a/test/TEST-16-DMSQUASH/test-init.sh +++ b/test/TEST-16-DMSQUASH/test-init.sh @@ -4,7 +4,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 -echo "dracut-root-block-success" >/dev/sda +echo "dracut-root-block-success" >/dev/sdb export TERM=linux export PS1='initramfs-test:\w\$ ' [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh index 7e5a7de2d..f2b996336 100755 --- a/test/TEST-16-DMSQUASH/test.sh +++ b/test/TEST-16-DMSQUASH/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on a LiveCD dmsquash filesystem" KVERSION="${KVERSION-$(uname -r)}" # Uncomment this to debug failures -#DEBUGFAIL="rd.shell rd.break" +#DEBUGFAIL="rd.shell rd.break rd.debug systemd.log_level=debug systemd.log_target=console" test_check() { if ! [ -d "/usr/lib/python2.7/site-packages/imgcreate" ]; then @@ -16,13 +16,24 @@ test_check() { test_run() { "$testdir"/run-qemu \ - -boot order=d \ - -cdrom "$TESTDIR"/livecd.iso \ - -drive format=raw,index=0,media=disk,file="$TESTDIR"/root.img \ - -m 256M -smp 2 -nographic \ - -net none \ - -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug systemd.log_level=debug systemd.log_target=console $DEBUGFAIL" \ - -initrd "$TESTDIR"/initramfs.testing + -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 256M -smp 2 \ + -nographic \ + -net none \ + -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -initrd "$TESTDIR"/initramfs.testing + + # mediacheck test with qemu GUI + # "$testdir"/run-qemu \ + # -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 256M -smp 2 \ + # -net none \ + # -append "root=live:CDLABEL=LiveCD live quiet rhgb selinux=0 rd.live.check" \ + # -initrd "$TESTDIR"/initramfs.testing + grep -F -m 1 -q dracut-root-block-success -- "$TESTDIR"/root.img || return 1 }