]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
TEST-16-DMSQUASH: add code for IO throtteling in qemu
authorHarald Hoyer <harald@redhat.com>
Wed, 18 Nov 2015 09:17:04 +0000 (10:17 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 18 Nov 2015 09:17:04 +0000 (10:17 +0100)
To test the mediacheck feature, I added commented out code with qemu IO
throtteling.

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

index cdbd4dd0e8827762a353e4cc328cb74e2e2035cb..206298da7f431eae2cf18d72485bd7bc223037f1 100755 (executable)
@@ -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
index 7e5a7de2d74bd63ed43217c19f3412dabdc8f6c2..f2b99633652ea70ad4454edd3cb66b877efd8bcb 100755 (executable)
@@ -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
 }