aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/05115
-rw-r--r--tests/qemu-iotests/051.out23
-rw-r--r--tests/qemu-iotests/051.pc.out23
3 files changed, 61 insertions, 0 deletions
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index f617e25e24..ee9c820d0f 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -100,6 +100,21 @@ run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
run_qemu -drive file="$TEST_IMG",driver=qcow2,format=qcow2
echo
+echo === Node names ===
+echo
+
+# Maximum length: 31 characters
+run_qemu -drive file="$TEST_IMG",node-name=x123456789012345678901234567890
+run_qemu -drive file="$TEST_IMG",node-name=x1234567890123456789012345678901
+
+# First character must be alphabetic
+# Following characters alphanumeric or -._
+run_qemu -drive file="$TEST_IMG",node-name=All-Types.of_all0wed_chars
+run_qemu -drive file="$TEST_IMG",node-name=123foo
+run_qemu -drive file="$TEST_IMG",node-name=_foo
+run_qemu -drive file="$TEST_IMG",node-name=foo#12
+
+echo
echo === Device without drive ===
echo
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index dd9846d1ce..b7273505c7 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -47,6 +47,29 @@ Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot specify both 'driver' and 'format'
+=== Node names ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=x123456789012345678901234567890
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) quit
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=x1234567890123456789012345678901
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=x1234567890123456789012345678901: Node name too long
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=All-Types.of_all0wed_chars
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) quit
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=123foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=123foo: Invalid node name
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=_foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=_foo: Invalid node name
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=foo#12
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=foo#12: Invalid node name
+
+
=== Device without drive ===
Testing: -device VIRTIO_SCSI -device scsi-hd
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out
index b01f9a90d7..e9257fe318 100644
--- a/tests/qemu-iotests/051.pc.out
+++ b/tests/qemu-iotests/051.pc.out
@@ -47,6 +47,29 @@ Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot specify both 'driver' and 'format'
+=== Node names ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=x123456789012345678901234567890
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) quit
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=x1234567890123456789012345678901
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=x1234567890123456789012345678901: Node name too long
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=All-Types.of_all0wed_chars
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) quit
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=123foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=123foo: Invalid node name
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=_foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=_foo: Invalid node name
+
+Testing: -drive file=TEST_DIR/t.qcow2,node-name=foo#12
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=foo#12: Invalid node name
+
+
=== Device without drive ===
Testing: -device VIRTIO_SCSI -device scsi-hd