Browse Source

TEST-16-DMSQUASH: add code for IO throtteling in qemu

To test the mediacheck feature, I added commented out code with qemu IO
throtteling.
master
Harald Hoyer 9 years ago
parent
commit
90ac2d2429
  1. 2
      test/TEST-16-DMSQUASH/test-init.sh
  2. 27
      test/TEST-16-DMSQUASH/test.sh

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

@ -4,7 +4,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; } @@ -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

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

@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on a LiveCD dmsquash filesystem" @@ -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() { @@ -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
}


Loading…
Cancel
Save