]> Git Repo - qemu.git/commitdiff
qemu-iotests: Test missing "driver" key for blockdev-add
authorFam Zheng <[email protected]>
Thu, 18 Sep 2014 20:36:43 +0000 (15:36 -0500)
committerLuiz Capitulino <[email protected]>
Fri, 26 Sep 2014 17:14:11 +0000 (13:14 -0400)
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Cc: [email protected]
Signed-off-by: Michael Roth <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
tests/qemu-iotests/087
tests/qemu-iotests/087.out

index 82c56b1394848d8c8d7c5ec8963a7e70fde78c91..d7454d13da53cfd6221058697aaafe65fe69e512 100755 (executable)
@@ -218,6 +218,23 @@ run_qemu <<EOF
 { "execute": "quit" }
 EOF
 
+echo
+echo === Missing driver ===
+echo
+
+_make_test_img -o encryption=on $size
+run_qemu -S <<EOF
+{ "execute": "qmp_capabilities" }
+{ "execute": "blockdev-add",
+  "arguments": {
+      "options": {
+        "id": "disk"
+      }
+    }
+  }
+{ "execute": "quit" }
+EOF
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
index 7fbee3ff5e21e6d9de0a8952a3fad8fde46dab99..f16bad0ab64faf3efe8bee91c9593d2426a848e7 100644 (file)
@@ -64,4 +64,17 @@ QMP_VERSION
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}}
 
+
+=== Missing driver ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on 
+Testing: -S
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "Invalid parameter type for 'driver', expected: string"}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}}
+
 *** done
This page took 0.028805 seconds and 4 git commands to generate.