run_net_test.sh: fix UML --readonly flag
Without this you end up with r=... instead of ubdar=... and:
Failed to initialize ubd device 0 :Couldn't determine size of device's file
VFS: Cannot open root device "98:0" or unknown-block(98,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(98,0)
Aborted
Change-Id: If0d53a8560b8dca8908f30794550b7a1360c85a7
diff --git a/net/test/run_net_test.sh b/net/test/run_net_test.sh
index 54e64a4..1768832 100755
--- a/net/test/run_net_test.sh
+++ b/net/test/run_net_test.sh
@@ -263,7 +263,7 @@
if ((nowrite == 0)); then
blockdevice=ubda
else
- blockdevice="${blockdevice}r"
+ blockdevice=ubdar
fi
exec $KERNEL_BINARY >&2 umid=net_test mem=512M \
@@ -288,9 +288,10 @@
cmdline="$cmdline net_test_exitcode=/dev/ttyS1"
# Map the --readonly flag to a QEMU block device flag
- blockdevice=
if ((nowrite > 0)); then
blockdevice=",readonly"
+ else
+ blockdevice=
fi
blockdevice="-drive file=$SCRIPT_DIR/$ROOTFS,format=raw,if=none,id=drive-virtio-disk0$blockdevice"
blockdevice="$blockdevice -device virtio-blk-pci,drive=drive-virtio-disk0"