]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: specify format=raw for qemu to avoid warning
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 25 Apr 2016 16:00:11 +0000 (12:00 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 May 2016 00:27:33 +0000 (20:27 -0400)
WARNING: Image format was not specified for
         '/var/tmp/systemd-test.tGi3od/rootdisk.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write
         operations on block 0 will be restricted.  Specify the 'raw' format
         explicitly to remove the restrictions.

Also use unsafe caching mode, we don't care about data integrity here.

test/test-functions

index b07c5003392ff282b66f960b46916952d24aa813..9e9f2953cb69205729e8686a773410377bc2f2d3 100644 (file)
@@ -79,6 +79,7 @@ $KERNEL_APPEND \
 -m 512M \
 -nographic \
 -kernel $KERNEL_BIN \
+-drive format=raw,cache=unsafe,file=${TESTDIR}/rootdisk.img \
 "
 
     if [[ "$INITRD" && "$SKIP_INITRD" != "yes" ]]; then
@@ -93,7 +94,7 @@ $KERNEL_APPEND \
         QEMU_BIN="timeout --foreground $QEMU_TIMEOUT $QEMU_BIN"
     fi
     ( set -x
-      $QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND" $TESTDIR/rootdisk.img ) || return 1
+      $QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND" ) || return 1
 }
 
 run_nspawn() {