qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
@ 2014-11-13 10:36 Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 1/9] qemu-iotests: run qemu with -nodefaults Mao Chuan Li
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

Currently the qemu-iotest framework is focused on the x86 platform. The suite should be usable by other platforms as well.
To enable multi-platform usage, this patch set enhances the framework scripts to address this. By using the default machine
type of the platform one can add specific output files if it deviates from the default. Secondly, single test cases can
be adjusted as well when e.g. devices have different names or are not supported at all. 

Mao Chuan Li (9):
  qemu-iotests: run qemu with -nodefaults
  qemu-iotests: qemu machine type support
  qemu-iotests: add core_pattern access functions
  qemu-iotests: fix test 039
  qemu-iotests: s390x: fix test 071
  qemu-iotests: s390x: fix test 087
  qemu-iotests: s390x: fix test 041
  qemu-iotests: s390x: fix test 055
  qemu-iotests: s390x: fix test 051

 tests/qemu-iotests/039                 |   3 +
 tests/qemu-iotests/041                 |   6 +
 tests/qemu-iotests/051                 |  91 +++++---
 tests/qemu-iotests/051.s390-virtio.out | 377 +++++++++++++++++++++++++++++++++
 tests/qemu-iotests/055                 |   6 +
 tests/qemu-iotests/071.s390-virtio.out |  86 ++++++++
 tests/qemu-iotests/087.s390-virtio.out |  68 ++++++
 tests/qemu-iotests/check               |   5 +
 tests/qemu-iotests/common              |   1 +
 tests/qemu-iotests/common.config       |   3 +-
 tests/qemu-iotests/common.qemu         |   2 +-
 tests/qemu-iotests/common.rc           |  17 ++
 tests/qemu-iotests/iotests.py          |   1 +
 13 files changed, 635 insertions(+), 31 deletions(-)
 create mode 100644 tests/qemu-iotests/051.s390-virtio.out
 create mode 100644 tests/qemu-iotests/071.s390-virtio.out
 create mode 100644 tests/qemu-iotests/087.s390-virtio.out

-- 
1.9.3

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 1/9] qemu-iotests: run qemu with -nodefaults
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 2/9] qemu-iotests: qemu machine type support Mao Chuan Li
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

This patch fixes an io test suite issue that was introduced with the
commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only
a single "stdio" character device'. The option supresses the creation of
default devices.

Reviewed-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/common        | 1 +
 tests/qemu-iotests/common.config | 2 +-
 tests/qemu-iotests/common.qemu   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
index 9e12bec..f3fa6dd 100644
--- a/tests/qemu-iotests/common
+++ b/tests/qemu-iotests/common
@@ -51,6 +51,7 @@ export IMGOPTS=""
 export CACHEMODE="writeback"
 export QEMU_IO_OPTIONS=""
 export CACHEMODE_IS_DEFAULT=true
+export QEMU_OPTIONS="-nodefaults"
 
 for r
 do
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index bd6790b..8e07c19 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -103,7 +103,7 @@ if [ -z "$QEMU_NBD_PROG" ]; then
     export QEMU_NBD_PROG="`set_prog_path qemu-nbd`"
 fi
 
-export QEMU=$QEMU_PROG
+export QEMU="$QEMU_PROG $QEMU_OPTIONS"
 export QEMU_IMG=$QEMU_IMG_PROG
 export QEMU_IO="$QEMU_IO_PROG $QEMU_IO_OPTIONS"
 export QEMU_NBD=$QEMU_NBD_PROG
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index ee7ebb4..ea27536 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -153,7 +153,7 @@ function _launch_qemu()
     mkfifo "${fifo_out}"
     mkfifo "${fifo_in}"
 
-    "${QEMU}" -nographic -serial none ${comm} -machine accel=qtest "${@}" 2>&1 \
+    ${QEMU} -nographic -serial none ${comm} -machine accel=qtest "${@}" 2>&1 \
                                                                 >"${fifo_out}" \
                                                                 <"${fifo_in}" &
     QEMU_PID[${_QEMU_HANDLE}]=$!
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 2/9] qemu-iotests: qemu machine type support
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 1/9] qemu-iotests: run qemu with -nodefaults Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 3/9] qemu-iotests: add core_pattern access functions Mao Chuan Li
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

This patch adds qemu machine type support to the io test suite. Based on
the qemu default machine type the reference output file can now vary
from the default to a machine specific output file if necessary. That
shall allow all platforms to use this test suite.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/check         | 5 +++++
 tests/qemu-iotests/common.config | 1 +
 tests/qemu-iotests/iotests.py    | 1 +
 3 files changed, 7 insertions(+)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 8ca4011..fc0351d 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -323,6 +323,11 @@ do
             fi
 
             reference="$source_iotests/$seq.out"
+            reference_machine="$source_iotests/$seq.$QEMU_DEFAULT_MACHINE.out"
+            if [ -f $reference_machine ]; then
+                reference=$reference_machine
+            fi
+
             if [ "$CACHEMODE" = "none" ]; then
                 [ -f "$source_iotests/$seq.out.nocache" ] && reference="$source_iotests/$seq.out.nocache"
             fi
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 8e07c19..3025921 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -107,6 +107,7 @@ export QEMU="$QEMU_PROG $QEMU_OPTIONS"
 export QEMU_IMG=$QEMU_IMG_PROG
 export QEMU_IO="$QEMU_IO_PROG $QEMU_IO_OPTIONS"
 export QEMU_NBD=$QEMU_NBD_PROG
+export QEMU_DEFAULT_MACHINE=$($QEMU -machine ? | awk '/(default)/{print $1}')
 
 [ -f /etc/qemu-iotest.config ]       && . /etc/qemu-iotest.config
 
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index f57f154..69dee95 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -39,6 +39,7 @@ imgproto = os.environ.get('IMGPROTO', 'file')
 test_dir = os.environ.get('TEST_DIR', '/var/tmp')
 output_dir = os.environ.get('OUTPUT_DIR', '.')
 cachemode = os.environ.get('CACHEMODE')
+qemu_default_machine = os.environ.get('QEMU_DEFAULT_MACHINE')
 
 socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper')
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 3/9] qemu-iotests: add core_pattern access functions
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 1/9] qemu-iotests: run qemu with -nodefaults Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 2/9] qemu-iotests: qemu machine type support Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Mao Chuan Li
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

To prevent core dump file generation, the new functions allow to clear
and restore the /proc/sys/kernel/core_pattern definition.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/common.rc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 9c49deb..87edf36 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -478,5 +478,22 @@ _die()
         exit 1
 }
 
+core_pattern_file="/proc/sys/kernel/core_pattern"
+
+_erase_core_pattern()
+{
+    saved_pattern=$(cat $core_pattern_file)
+
+    echo  > "$core_pattern_file"
+    if [ $? != 0 ]; then
+        exit 1
+    fi
+}
+
+_restore_core_pattern()
+{
+    echo $saved_pattern > $core_pattern_file
+}
+
 # make sure this script returns success
 /bin/true
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (2 preceding siblings ...)
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 3/9] qemu-iotests: add core_pattern access functions Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 15:54   ` Max Reitz
  2014-11-25 18:07   ` Michael Mueller
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 5/9] qemu-iotests: s390x: fix test 071 Mao Chuan Li
                   ` (5 subsequent siblings)
  9 siblings, 2 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

For successful execution of case 039, core dump need be
disabled. Just running "ulimit -c 0" command is not enough when the
/proc/sys/kernel/core_pattern indicates to pipe the dump to another
application. So we must erase the pattern in addition to the ulimit
command.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/039 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
index 84c9167..bb9382a 100755
--- a/tests/qemu-iotests/039
+++ b/tests/qemu-iotests/039
@@ -34,6 +34,7 @@ status=1	# failure is the default!
 _cleanup()
 {
 	_cleanup_test_img
+    _restore_core_pattern
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
@@ -41,6 +42,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
+_erase_core_pattern
+
 _supported_fmt qcow2
 _supported_proto file
 _supported_os Linux
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 5/9] qemu-iotests: s390x: fix test 071
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (3 preceding siblings ...)
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 6/9] qemu-iotests: s390x: fix test 087 Mao Chuan Li
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

All the commands run by this test case are suitable for the s390 platform.
But the commands in this case produce slightly different output compared
to the default x86_64 platform.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/071.s390-virtio.out | 86 ++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 tests/qemu-iotests/071.s390-virtio.out

diff --git a/tests/qemu-iotests/071.s390-virtio.out b/tests/qemu-iotests/071.s390-virtio.out
new file mode 100644
index 0000000..db929b4
--- /dev/null
+++ b/tests/qemu-iotests/071.s390-virtio.out
@@ -0,0 +1,86 @@
+QA output created by 071
+
+=== Testing blkverify through filename ===
+
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 512/512 bytes at offset 229376
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 512/512 bytes at offset 229376
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+blkverify: read sector_num=0 nb_sectors=4 contents mismatch in sector 0
+
+=== Testing blkverify through file blockref ===
+
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 512/512 bytes at offset 229376
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 512/512 bytes at offset 229376
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+blkverify: read sector_num=0 nb_sectors=4 contents mismatch in sector 0
+
+=== Testing blkdebug through filename ===
+
+read failed: Input/output error
+
+=== Testing blkdebug through file blockref ===
+
+read failed: Input/output error
+
+=== Testing blkdebug on existing block device ===
+
+Testing: -drive file=TEST_DIR/t.IMGFMT,format=raw,if=none,id=drive0
+QMP_VERSION
+{"return": {}}
+{"return": {}}
+read failed: Input/output error
+{"return": ""}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+
+=== Testing blkverify on existing block device ===
+
+Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=drive0
+QMP_VERSION
+{"return": {}}
+{"return": {}}
+blkverify: read sector_num=0 nb_sectors=1 contents mismatch in sector 0
+
+
+=== Testing blkverify on existing raw block device ===
+
+Testing: -drive file=TEST_DIR/t.IMGFMT.base,if=none,id=drive0
+QMP_VERSION
+{"return": {}}
+{"return": {}}
+blkverify: read sector_num=0 nb_sectors=1 contents mismatch in sector 0
+
+
+=== Testing blkdebug's set-state through QMP ===
+
+Testing: -drive file=TEST_DIR/t.IMGFMT,format=raw,if=none,id=drive0
+QMP_VERSION
+{"return": {}}
+{"return": {}}
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+{"return": ""}
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+{"return": ""}
+read failed: Input/output error
+{"return": ""}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+*** done
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 6/9] qemu-iotests: s390x: fix test 087
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (4 preceding siblings ...)
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 5/9] qemu-iotests: s390x: fix test 071 Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 7/9] qemu-iotests: s390x: fix test 041 Mao Chuan Li
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

All the commands run by this test case are suitable for the s390 platform.
But the commands in this case produce slightly different output compared
to the default x86_64 platform.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/087.s390-virtio.out | 68 ++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 tests/qemu-iotests/087.s390-virtio.out

diff --git a/tests/qemu-iotests/087.s390-virtio.out b/tests/qemu-iotests/087.s390-virtio.out
new file mode 100644
index 0000000..2873d92
--- /dev/null
+++ b/tests/qemu-iotests/087.s390-virtio.out
@@ -0,0 +1,68 @@
+QA output created by 087
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+
+=== Missing ID ===
+
+Testing:
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "Block device needs an ID"}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+
+=== Duplicate ID ===
+
+Testing:
+QMP_VERSION
+{"return": {}}
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "Device with id 'disk' already exists"}}
+{"error": {"class": "GenericError", "desc": "Device name 'test-node' conflicts with an existing node name"}}
+main-loop: WARNING: I/O thread spun for 1000 iterations
+{"error": {"class": "GenericError", "desc": "could not open disk image disk2: node-name=disk is conflicting with a device id"}}
+{"error": {"class": "GenericError", "desc": "could not open disk image disk2: Duplicate node name"}}
+{"error": {"class": "GenericError", "desc": "could not open disk image disk3: node-name=disk3 is conflicting with a device id"}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+
+=== aio=native without O_DIRECT ===
+
+Testing:
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "aio=native requires cache.direct=true"}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+
+=== Encrypted image ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
+Testing: -S
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "blockdev-add doesn't support encrypted devices"}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+Testing:
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "could not open disk image disk: Guest must be stopped for opening of encrypted image"}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
+
+
+=== 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"}
+
+*** done
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 7/9] qemu-iotests: s390x: fix test 041
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (5 preceding siblings ...)
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 6/9] qemu-iotests: s390x: fix test 087 Mao Chuan Li
@ 2014-11-13 10:36 ` Mao Chuan Li
  2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 8/9] qemu-iotests: s390x: fix test 055 Mao Chuan Li
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

There is no such device 'ide-cd' defined on the s390 platform, so
test_medium_not_found() test is skipped.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li  <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/041 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 59a8f73..4fb1b34 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -197,6 +197,9 @@ class TestSingleDrive(ImageMirroringTestCase):
                         'target image does not match source after mirroring')
 
     def test_medium_not_found(self):
+	if iotests.qemu_default_machine == 's390-virtio':
+	    return
+
         result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
                              target=target_img)
         self.assert_qmp(result, 'error/class', 'GenericError')
@@ -867,6 +870,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
         if not self.has_quorum():
             return
 
+        if iotests.qemu_default_machine == 's390-virtio':
+	    return
+
         result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
                              node_name='repair0',
                              replaces='img1',
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 8/9] qemu-iotests: s390x: fix test 055
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (6 preceding siblings ...)
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 7/9] qemu-iotests: s390x: fix test 041 Mao Chuan Li
@ 2014-11-13 10:37 ` Mao Chuan Li
  2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 9/9] qemu-iotests: s390x: fix test 051 Mao Chuan Li
  2014-11-27  9:30 ` [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Max Reitz
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

There is no such device 'ide-cd' defined on the s390 platform, so
test_medium_not_found() test is skipped.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li  <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/055 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index 451b67d..5cf487b 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -90,6 +90,9 @@ class TestSingleDrive(iotests.QMPTestCase):
                         'target image does not match source after backup')
 
     def test_medium_not_found(self):
+        if iotests.qemu_default_machine == 's390-virtio':
+	    return
+
         result = self.vm.qmp('drive-backup', device='ide1-cd0',
                              target=target_img, sync='full')
         self.assert_qmp(result, 'error/class', 'GenericError')
@@ -252,6 +255,9 @@ class TestSingleTransaction(iotests.QMPTestCase):
                         'target image does not match source after backup')
 
     def test_medium_not_found(self):
+        if iotests.qemu_default_machine == 's390-virtio':
+	    return
+
         result = self.vm.qmp('transaction', actions=[{
                 'type': 'drive-backup',
                 'data': { 'device': 'ide1-cd0',
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Qemu-devel] [PATCH v1 RFC 9/9] qemu-iotests: s390x: fix test 051
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (7 preceding siblings ...)
  2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 8/9] qemu-iotests: s390x: fix test 055 Mao Chuan Li
@ 2014-11-13 10:37 ` Mao Chuan Li
  2014-11-27  9:30 ` [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Max Reitz
  9 siblings, 0 replies; 20+ messages in thread
From: Mao Chuan Li @ 2014-11-13 10:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Mao Chuan Li, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

The tests for device type "ide_cd" are skipped for the s390 platform.
The default device id of hard disk on the s390 platform differs to that
of the x86 platform. A new variable device_id is defined and "virtio0"
set for the s390 platform. A s390 platform specific output file is also
needed.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/051                 |  91 +++++---
 tests/qemu-iotests/051.s390-virtio.out | 377 +++++++++++++++++++++++++++++++++
 2 files changed, 439 insertions(+), 29 deletions(-)
 create mode 100644 tests/qemu-iotests/051.s390-virtio.out

diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 11c858f..2b600df 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -137,13 +137,19 @@ run_qemu -drive if=ide
 run_qemu -drive if=virtio
 run_qemu -drive if=scsi
 
-run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
-run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
-
-run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
-run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
-run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
+case "$QEMU_DEFAULT_MACHINE" in
+    s390-virtio)
+        ;;
+    *)
+        run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
+        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
+
+        run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
+        run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
+        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
+        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
+        ;;
+esac
 
 echo
 echo === Read-only ===
@@ -157,13 +163,19 @@ run_qemu -drive file="$TEST_IMG",if=ide,readonly=on
 run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on
 run_qemu -drive file="$TEST_IMG",if=scsi,readonly=on
 
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
+case "$QEMU_DEFAULT_MACHINE" in
+    s390-virtio)
+        ;;
+    *)
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
 
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
+        ;;
+esac
 
 echo
 echo === Cache modes ===
@@ -172,12 +184,24 @@ echo
 # Cannot use the test image because cache=none might not work on the host FS
 # Use cdrom so that we won't get errors about missing media
 
-run_qemu -drive media=cdrom,cache=none
-run_qemu -drive media=cdrom,cache=directsync
-run_qemu -drive media=cdrom,cache=writeback
-run_qemu -drive media=cdrom,cache=writethrough
-run_qemu -drive media=cdrom,cache=unsafe
-run_qemu -drive media=cdrom,cache=invalid_value
+case "$QEMU_DEFAULT_MACHINE" in
+    s390-virtio)
+        run_qemu -drive if=scsi,media=cdrom,cache=none
+        run_qemu -drive if=scsi,media=cdrom,cache=directsync
+        run_qemu -drive if=scsi,media=cdrom,cache=writeback
+        run_qemu -drive if=scsi,media=cdrom,cache=writethrough
+        run_qemu -drive if=scsi,media=cdrom,cache=unsafe
+        run_qemu -drive if=scsi,media=cdrom,cache=invalid_value
+        ;;
+    *)
+        run_qemu -drive media=cdrom,cache=none
+        run_qemu -drive media=cdrom,cache=directsync
+        run_qemu -drive media=cdrom,cache=writeback
+        run_qemu -drive media=cdrom,cache=writethrough
+        run_qemu -drive media=cdrom,cache=unsafe
+        run_qemu -drive media=cdrom,cache=invalid_value
+        ;;
+esac
 
 echo
 echo === Specifying the protocol layer ===
@@ -241,28 +265,37 @@ echo
 echo === Snapshot mode ===
 echo
 
+case "$QEMU_DEFAULT_MACHINE" in
+    s390-virtio)
+        device_id="virtio0"
+        ;;
+    *)
+        device_id="ide0-hd0"
+        ;;
+esac
+
 $QEMU_IO -c "write -P 0x11 0 4k" "$TEST_IMG" | _filter_qemu_io
 
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="$TEST_IMG" -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file.filename="$TEST_IMG",driver=qcow2,snapshot=on | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file.filename="$TEST_IMG",driver=qcow2 -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="file:$TEST_IMG" -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="file:$TEST_IMG",snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG" -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file.filename="$TEST_IMG",driver=qcow2,snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file.filename="$TEST_IMG",driver=qcow2 -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="file:$TEST_IMG" -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="file:$TEST_IMG",snapshot=on | _filter_qemu_io
 
 # Opening a read-only file r/w with snapshot=on
 chmod u-w "$TEST_IMG"
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="$TEST_IMG" -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG" -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
 chmod u+w "$TEST_IMG"
 
 $QEMU_IO -c "read -P 0x11 0 4k" "$TEST_IMG" | _filter_qemu_io
 
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive file="$TEST_IMG",snapshot=off | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG",snapshot=off | _filter_qemu_io
 
 $QEMU_IO -c "read -P 0x22 0 4k" "$TEST_IMG" | _filter_qemu_io
 
-echo -e 'qemu-io ide0-hd0 "write -P 0x33 0 4k"\ncommit ide0-hd0' | run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
+echo -e "qemu-io $device_id \"write -P 0x33 0 4k\"\ncommit $device_id" | run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
 
 $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io
 
diff --git a/tests/qemu-iotests/051.s390-virtio.out b/tests/qemu-iotests/051.s390-virtio.out
new file mode 100644
index 0000000..751670f
--- /dev/null
+++ b/tests/qemu-iotests/051.s390-virtio.out
@@ -0,0 +1,377 @@
+QA output created by 051
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.base'
+
+=== Unknown option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
+
+
+=== Unknown protocol option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+
+=== Invalid format ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=foo: 'foo' invalid format
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: could not open disk image TEST_DIR/t.qcow2: Unknown driver 'foo'
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2: could not open disk image TEST_DIR/t.qcow2: Driver specified twice
+
+
+=== Overriding backing file ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig -nodefaults
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) i^[[K^[[Din^[[K^[[D^[[Dinf^[[K^[[D^[[D^[[Dinfo^[[K^[[D^[[D^[[D^[[Dinfo ^[[K^[[D^[[D^[[D^[[D^[[Dinfo b^[[K^[[D^[[D^[[D^[[D^[[D^[[Dinfo bl^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dinfo blo^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dinfo bloc^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dinfo block^[[K
+virtio0: TEST_DIR/t.qcow2 (qcow2)
+    Backing file:     TEST_DIR/t.qcow2.orig (chain depth: 1)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig: could not open disk image TEST_DIR/t.qcow2: Driver doesn't support backing files
+
+Testing: -drive file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig: could not open disk image TEST_DIR/t.qcow2: Driver doesn't support backing files
+
+Testing: -drive file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig: could not open disk image TEST_DIR/t.qcow2: Driver doesn't support backing files
+
+
+=== Enable and disable lazy refcounting on the command line, plus some invalid values ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: could not open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on' or 'off'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: could not open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on' or 'off'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: could not open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on' or 'off'
+
+
+=== With version 2 images enabling lazy refcounts must fail ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: could not open disk image TEST_DIR/t.qcow2: Lazy refcounts require a qcow2 image with at least qemu 1.1 compatibility level
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+
+=== No medium ===
+
+Testing: -drive if=floppy
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=floppy0,file=,if=floppy,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=ide,media=cdrom
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=ide0-cd0,file=,if=ide,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=scsi,media=cdrom
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=ide
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=ide0-hd0,file=,if=ide,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=virtio
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
+QEMU_PROG: -drive if=virtio: Device initialization failed.
+QEMU_PROG: -drive if=virtio: Device 'virtio-blk-s390' could not be initialized
+
+Testing: -drive if=scsi
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-hd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+
+=== Read-only ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=floppy0,file=TEST_DIR/t.qcow2,if=floppy,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=ide0-cd0,file=TEST_DIR/t.qcow2,if=ide,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=TEST_DIR/t.qcow2,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=ide0-hd0,file=TEST_DIR/t.qcow2,if=ide,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-hd0,file=TEST_DIR/t.qcow2,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+
+=== Cache modes ===
+
+Testing: -drive if=scsi,media=cdrom,cache=none
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=scsi,media=cdrom,cache=directsync
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=scsi,media=cdrom,cache=writeback
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=scsi,media=cdrom,cache=writethrough
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=scsi,media=cdrom,cache=unsafe
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device: id=scsi0-cd0,file=,if=scsi,bus=0,unit=0
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive if=scsi,media=cdrom,cache=invalid_value
+QEMU_PROG: -drive if=scsi,media=cdrom,cache=invalid_value: invalid cache option
+
+
+=== Specifying the protocol layer ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device '' doesn't support the option 'filename'
+
+
+=== Leaving out required options ===
+
+Testing: -drive driver=file
+QEMU_PROG: -drive driver=file: could not open disk image virtio0: The 'file' block driver requires a file name
+
+Testing: -drive driver=nbd
+QEMU_PROG: -drive driver=nbd: could not open disk image virtio0: one of path and host must be specified.
+
+Testing: -drive driver=raw
+QEMU_PROG: -drive driver=raw: could not open disk image virtio0: Can't use 'raw' as a block driver for the protocol level
+
+Testing: -drive file.driver=file
+QEMU_PROG: -drive file.driver=file: could not open disk image virtio0: The 'file' block driver requires a file name
+
+Testing: -drive file.driver=nbd
+QEMU_PROG: -drive file.driver=nbd: could not open disk image virtio0: one of path and host must be specified.
+
+Testing: -drive file.driver=raw
+QEMU_PROG: -drive file.driver=raw: could not open disk image virtio0: Can't use 'raw' as a block driver for the protocol level
+
+Testing: -drive foo=bar
+QEMU_PROG: -drive foo=bar: could not open disk image virtio0: Must specify either driver or file
+
+
+=== Specifying both an option and its legacy alias ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678: 'throttling.iops-total' and its alias 'iops' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678: 'throttling.iops-read' and its alias 'iops_rd' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678: 'throttling.iops-write' and its alias 'iops_wr' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678: 'throttling.bps-total' and its alias 'bps' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678: 'throttling.bps-read' and its alias 'bps_rd' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678: 'throttling.bps-write' and its alias 'bps_wr' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678: 'throttling.iops-total-max' and its alias 'iops_max' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678: 'throttling.iops-read-max' and its alias 'iops_rd_max' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678: 'throttling.iops-write-max' and its alias 'iops_wr_max' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678: 'throttling.bps-total-max' and its alias 'bps_max' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678: 'throttling.bps-read-max' and its alias 'bps_rd_max' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678: 'throttling.bps-write-max' and its alias 'bps_wr_max' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678: 'throttling.iops-size' and its alias 'iops_size' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off: 'read-only' and its alias 'readonly' can't be used at the same time
+
+
+=== Parsing protocol from file name ===
+
+Testing: -hda foo:bar
+QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown protocol
+
+Testing: -drive file=foo:bar
+QEMU_PROG: -drive file=foo:bar: could not open disk image foo:bar: Unknown protocol
+
+Testing: -drive file.filename=foo:bar
+QEMU_PROG: -drive file.filename=foo:bar: could not open disk image virtio0: Could not open 'foo:bar': No such file or directory
+
+Testing: -hda file:TEST_DIR/t.qcow2
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=file:TEST_DIR/t.qcow2
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file.filename=file:TEST_DIR/t.qcow2
+QEMU_PROG: -drive file.filename=file:TEST_DIR/t.qcow2: could not open disk image virtio0: Could not open 'file:TEST_DIR/t.qcow2': No such file or directory
+
+
+=== Snapshot mode ===
+
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vir^[[K^[[D^[[D^[[D^[[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[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[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.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vir^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virt^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virti^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "w^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[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[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vir^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virt^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virti^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D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[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=file:TEST_DIR/t.qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vir^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virt^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D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=file:TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dq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[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vir^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virt^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virti^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[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D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^[[K^[[D^[[D^[[D^[[D^[[Dqemu-i^[[K^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io vir^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virt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[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dqemu-io virtio0 "write -P 0x22 0 4k"^[[K
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q^[[K^[[Dqe^[[K^[[D^[[Dqem^[[K^[[D^[[D^[[Dqemu^[[K^[[D^[[D^[[D^[[Dqemu-^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set 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) c^[[K^[[Dco^[[K^[[D^[[Dcom^[[K^[[D^[[D^[[Dcomm^[[K^[[D^[[D^[[D^[[Dcommi^[[K^[[D^[[D^[[D^[[D^[[Dcommit^[[K^[[D^[[D^[[D^[[D^[[D^[[Dcommit ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit v^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit vi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit vir^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit virt^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit virti^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit virtio^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit virtio0^[[K
+(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+*** done
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Mao Chuan Li
@ 2014-11-13 15:54   ` Max Reitz
  2014-11-25 18:07   ` Michael Mueller
  1 sibling, 0 replies; 20+ messages in thread
From: Max Reitz @ 2014-11-13 15:54 UTC (permalink / raw)
  To: Mao Chuan Li, qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> For successful execution of case 039, core dump need be
> disabled. Just running "ulimit -c 0" command is not enough when the
> /proc/sys/kernel/core_pattern indicates to pipe the dump to another
> application. So we must erase the pattern in addition to the ulimit
> command.
>
> Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
> Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
> ---
>   tests/qemu-iotests/039 | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
> index 84c9167..bb9382a 100755
> --- a/tests/qemu-iotests/039
> +++ b/tests/qemu-iotests/039
> @@ -34,6 +34,7 @@ status=1	# failure is the default!
>   _cleanup()
>   {
>   	_cleanup_test_img
> +    _restore_core_pattern
>   }
>   trap "_cleanup; exit \$status" 0 1 2 3 15
>   
> @@ -41,6 +42,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>   . ./common.rc
>   . ./common.filter
>   
> +_erase_core_pattern
> +
>   _supported_fmt qcow2
>   _supported_proto file
>   _supported_os Linux

Do you really want the user to be root to execute the iotests?

Max

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039
       [not found] <1416470936.23362.1.camel@maoLaptop.cn.ibm.com>
@ 2014-11-20  8:45 ` Max Reitz
  0 siblings, 0 replies; 20+ messages in thread
From: Max Reitz @ 2014-11-20  8:45 UTC (permalink / raw)
  To: Mao Chuan Li
  Cc: Kevin Wolf, Michael Mueller, Alexander Graf, qemu-devel,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

On 2014-11-20 at 09:08, Mao Chuan Li wrote:
> The intention is to disable the core dump, if there is another way we
> can achieve that, switching to root is not necessary. Any other
> alternative way?  Thanks!
>
> Mao Chuan Li

Hi,

I cannot think of a way; on the other hand, I don't think disabling the 
core dump is necessary either. Simply filtering out '(core dumped) ' is 
not pretty but still suffices for me (we can put that into a filter 
function in common.filter and if other people see other messages for a 
core dump, they can expand that list).

If we really want to disable core dumps, we should change qemu-io not to 
use abort() on -c abort (raise(SIGKILL) seems like a good alternative to 
me); or, alternatively, introduce a new command 'kill' which then does 
raise(SIGKILL) so we don't have to break compatibility.

Max

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039
  2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Mao Chuan Li
  2014-11-13 15:54   ` Max Reitz
@ 2014-11-25 18:07   ` Michael Mueller
  1 sibling, 0 replies; 20+ messages in thread
From: Michael Mueller @ 2014-11-25 18:07 UTC (permalink / raw)
  To: Mao Chuan Li
  Cc: Kevin Wolf, qemu-devel, Alexander Graf, Christian Borntraeger,
	Stefan Hajnoczi, Cornelia Huck

On Thu, 13 Nov 2014 18:36:56 +0800
Mao Chuan Li <maochuan@linux.vnet.ibm.com> wrote:

> For successful execution of case 039, core dump need be
> disabled. Just running "ulimit -c 0" command is not enough when the
> /proc/sys/kernel/core_pattern indicates to pipe the dump to another
> application. So we must erase the pattern in addition to the ulimit
> command.
> 
> Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
> Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
> ---
>  tests/qemu-iotests/039 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
> index 84c9167..bb9382a 100755
> --- a/tests/qemu-iotests/039
> +++ b/tests/qemu-iotests/039
> @@ -34,6 +34,7 @@ status=1	# failure is the default!
>  _cleanup()
>  {
>  	_cleanup_test_img
> +    _restore_core_pattern
>  }
>  trap "_cleanup; exit \$status" 0 1 2 3 15
> 
> @@ -41,6 +42,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>  . ./common.rc
>  . ./common.filter
> 
> +_erase_core_pattern
> +
>  _supported_fmt qcow2
>  _supported_proto file
>  _supported_os Linux

Mao,

you can skip this a and the previous (3/9) patch from the series, please have a look to the patch
Max has posted to solve the issue.

Thanks
Michael

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
                   ` (8 preceding siblings ...)
  2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 9/9] qemu-iotests: s390x: fix test 051 Mao Chuan Li
@ 2014-11-27  9:30 ` Max Reitz
  2014-11-27  9:45   ` Max Reitz
  2014-11-27 11:08   ` Michael Mueller
  9 siblings, 2 replies; 20+ messages in thread
From: Max Reitz @ 2014-11-27  9:30 UTC (permalink / raw)
  To: Mao Chuan Li, qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> Currently the qemu-iotest framework is focused on the x86 platform. The suite should be usable by other platforms as well.
> To enable multi-platform usage, this patch set enhances the framework scripts to address this. By using the default machine
> type of the platform one can add specific output files if it deviates from the default. Secondly, single test cases can
> be adjusted as well when e.g. devices have different names or are not supported at all.
>
> Mao Chuan Li (9):
>    qemu-iotests: run qemu with -nodefaults
>    qemu-iotests: qemu machine type support
>    qemu-iotests: add core_pattern access functions
>    qemu-iotests: fix test 039

>    qemu-iotests: s390x: fix test 071
>    qemu-iotests: s390x: fix test 087

To me, the main difference between the current test output and the new 
s390-specific seems to be lines about CD and floppy disk; due to patch 
1, they are gone from x86 as well, though. Therefore, we don't need 
special s390 output, but need to apply the changes directly to 071.out 
and 087.out.

Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
don't know why 091 fails, but 067 fails because CD and floppy are 
missing from the block-query result and the DEVICE_TRAY_MOVED events are 
missing from QMP output in general (which is completely fine, we just 
need to adjust the reference output accordingly).

Max

>    qemu-iotests: s390x: fix test 041
>    qemu-iotests: s390x: fix test 055
>    qemu-iotests: s390x: fix test 051

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-27  9:30 ` [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Max Reitz
@ 2014-11-27  9:45   ` Max Reitz
  2014-11-27 11:08   ` Michael Mueller
  1 sibling, 0 replies; 20+ messages in thread
From: Max Reitz @ 2014-11-27  9:45 UTC (permalink / raw)
  To: Mao Chuan Li, qemu-devel
  Cc: Kevin Wolf, Michael Mueller, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

On 2014-11-27 at 10:30, Max Reitz wrote:
> On 2014-11-13 at 11:36, Mao Chuan Li wrote:
>> Currently the qemu-iotest framework is focused on the x86 platform. 
>> The suite should be usable by other platforms as well.
>> To enable multi-platform usage, this patch set enhances the framework 
>> scripts to address this. By using the default machine
>> type of the platform one can add specific output files if it deviates 
>> from the default. Secondly, single test cases can
>> be adjusted as well when e.g. devices have different names or are not 
>> supported at all.
>>
>> Mao Chuan Li (9):
>>    qemu-iotests: run qemu with -nodefaults
>>    qemu-iotests: qemu machine type support
>>    qemu-iotests: add core_pattern access functions
>>    qemu-iotests: fix test 039
>
>>    qemu-iotests: s390x: fix test 071
>>    qemu-iotests: s390x: fix test 087
>
> To me, the main difference between the current test output and the new 
> s390-specific seems to be lines about CD and floppy disk; due to patch 
> 1, they are gone from x86 as well, though. Therefore, we don't need 
> special s390 output, but need to apply the changes directly to 071.out 
> and 087.out.
>
> Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. 
> I don't know why 091 fails, but 067 fails because CD and floppy are 
> missing from the block-query result and the DEVICE_TRAY_MOVED events 
> are missing from QMP output in general (which is completely fine, we 
> just need to adjust the reference output accordingly).

Ah, I know why 091 failed. I forgot -c writethrough and ran it in /tmp. 
My bad. So it's only 067 that needs fixing.

Max

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-27  9:30 ` [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Max Reitz
  2014-11-27  9:45   ` Max Reitz
@ 2014-11-27 11:08   ` Michael Mueller
  2014-11-27 11:27     ` Kevin Wolf
  1 sibling, 1 reply; 20+ messages in thread
From: Michael Mueller @ 2014-11-27 11:08 UTC (permalink / raw)
  To: Max Reitz
  Cc: Kevin Wolf, Mao Chuan Li, qemu-devel, Alexander Graf,
	Christian Borntraeger, Stefan Hajnoczi, Cornelia Huck

On Thu, 27 Nov 2014 10:30:33 +0100
Max Reitz <mreitz@redhat.com> wrote:

> On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> > Currently the qemu-iotest framework is focused on the x86 platform. The suite should be
> > usable by other platforms as well. To enable multi-platform usage, this patch set enhances
> > the framework scripts to address this. By using the default machine type of the platform one
> > can add specific output files if it deviates from the default. Secondly, single test cases
> > can be adjusted as well when e.g. devices have different names or are not supported at all.
> >
> > Mao Chuan Li (9):
> >    qemu-iotests: run qemu with -nodefaults
> >    qemu-iotests: qemu machine type support
> >    qemu-iotests: add core_pattern access functions
> >    qemu-iotests: fix test 039
> 
> >    qemu-iotests: s390x: fix test 071
> >    qemu-iotests: s390x: fix test 087
> 
> To me, the main difference between the current test output and the new 
> s390-specific seems to be lines about CD and floppy disk; due to patch 
> 1, they are gone from x86 as well, though. Therefore, we don't need 
> special s390 output, but need to apply the changes directly to 071.out 
> and 087.out.

perfect, that's fully in our interest.

> 
> Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
> don't know why 091 fails, but 067 fails because CD and floppy are 
> missing from the block-query result and the DEVICE_TRAY_MOVED events are 
> missing from QMP output in general (which is completely fine, we just 
> need to adjust the reference output accordingly).
> 
> Max
> 
> >    qemu-iotests: s390x: fix test 041
> >    qemu-iotests: s390x: fix test 055
> >    qemu-iotests: s390x: fix test 051
> 

We have two more test 060 and 082 that fail with the following difference to
the reference output. We analyzed it and it turns out that the size on disk is
file system dependent. In our case it ran on a s390/ext3. Thus we think comparing
the size on disk should be filtered. With other file system like ext4 or tmpfs we
get also 196K. We don't want to enforce a specific file system to be used.    

060         - output mismatch (see 060.out.bad)
--- /home/mimu/prog/qemu/tests/qemu-iotests/060.out	2014-11-07 09:34:09.106410738 +0100
+++ 060.out.bad	2014-11-27 11:32:43.342907638 +0100
@@ -14,7 +14,7 @@
 image: TEST_DIR/t.qcow2
 file format: qcow2
 virtual size: 64M (67108864 bytes)
-disk size: 196K
+disk size: 200K
 cluster_size: 65536
 Format specific information:
     compat: 1.1

Would this be excaptable with replacing the out file

diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 9772d36..3f608ed 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
 $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
 
 # This information should be available through qemu-img info
-$QEMU_IMG info "$TEST_IMG" | _filter_testdir
+$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
 
 # Try to open the image R/W (which should fail)
 $QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 3acdb30..fe6729d 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -220,5 +220,10 @@ _filter_qemu_img_map()
         -e 's/Mapped to *//' | _filter_testdir | _filter_imgfmt
 }
 
+_filter_disk_size()
+{
+    sed -e '/^disk size: .*$/d'
+}
+
 # make sure this script returns success
 /bin/true

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-27 11:08   ` Michael Mueller
@ 2014-11-27 11:27     ` Kevin Wolf
  2014-11-27 13:34       ` Michael Mueller
  0 siblings, 1 reply; 20+ messages in thread
From: Kevin Wolf @ 2014-11-27 11:27 UTC (permalink / raw)
  To: Michael Mueller
  Cc: Mao Chuan Li, Alexander Graf, qemu-devel, Christian Borntraeger,
	Stefan Hajnoczi, Cornelia Huck, Max Reitz

Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben:
> On Thu, 27 Nov 2014 10:30:33 +0100
> Max Reitz <mreitz@redhat.com> wrote:
> 
> > On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> > > Currently the qemu-iotest framework is focused on the x86 platform. The suite should be
> > > usable by other platforms as well. To enable multi-platform usage, this patch set enhances
> > > the framework scripts to address this. By using the default machine type of the platform one
> > > can add specific output files if it deviates from the default. Secondly, single test cases
> > > can be adjusted as well when e.g. devices have different names or are not supported at all.
> > >
> > > Mao Chuan Li (9):
> > >    qemu-iotests: run qemu with -nodefaults
> > >    qemu-iotests: qemu machine type support
> > >    qemu-iotests: add core_pattern access functions
> > >    qemu-iotests: fix test 039
> > 
> > >    qemu-iotests: s390x: fix test 071
> > >    qemu-iotests: s390x: fix test 087
> > 
> > To me, the main difference between the current test output and the new 
> > s390-specific seems to be lines about CD and floppy disk; due to patch 
> > 1, they are gone from x86 as well, though. Therefore, we don't need 
> > special s390 output, but need to apply the changes directly to 071.out 
> > and 087.out.
> 
> perfect, that's fully in our interest.
> 
> > 
> > Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
> > don't know why 091 fails, but 067 fails because CD and floppy are 
> > missing from the block-query result and the DEVICE_TRAY_MOVED events are 
> > missing from QMP output in general (which is completely fine, we just 
> > need to adjust the reference output accordingly).
> > 
> > Max
> > 
> > >    qemu-iotests: s390x: fix test 041
> > >    qemu-iotests: s390x: fix test 055
> > >    qemu-iotests: s390x: fix test 051
> > 
> 
> We have two more test 060 and 082 that fail with the following difference to
> the reference output. We analyzed it and it turns out that the size on disk is
> file system dependent. In our case it ran on a s390/ext3. Thus we think comparing
> the size on disk should be filtered. With other file system like ext4 or tmpfs we
> get also 196K. We don't want to enforce a specific file system to be used.    
> 
> 060         - output mismatch (see 060.out.bad)
> --- /home/mimu/prog/qemu/tests/qemu-iotests/060.out	2014-11-07 09:34:09.106410738 +0100
> +++ 060.out.bad	2014-11-27 11:32:43.342907638 +0100
> @@ -14,7 +14,7 @@
>  image: TEST_DIR/t.qcow2
>  file format: qcow2
>  virtual size: 64M (67108864 bytes)
> -disk size: 196K
> +disk size: 200K
>  cluster_size: 65536
>  Format specific information:
>      compat: 1.1
> 
> Would this be excaptable with replacing the out file
> 
> diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
> index 9772d36..3f608ed 100755
> --- a/tests/qemu-iotests/060
> +++ b/tests/qemu-iotests/060
> @@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
>  $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
>  
>  # This information should be available through qemu-img info
> -$QEMU_IMG info "$TEST_IMG" | _filter_testdir
> +$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size

_img_info already filters the size out. The reason why it isn't used
here is that it also filters all of the format specific information out.
We could probably make that part optional and then reuse it here.

Kevin

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-27 11:27     ` Kevin Wolf
@ 2014-11-27 13:34       ` Michael Mueller
  2014-11-27 14:03         ` Kevin Wolf
  0 siblings, 1 reply; 20+ messages in thread
From: Michael Mueller @ 2014-11-27 13:34 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: Mao Chuan Li, Alexander Graf, qemu-devel, Christian Borntraeger,
	Stefan Hajnoczi, Cornelia Huck, Max Reitz

On Thu, 27 Nov 2014 12:27:56 +0100
Kevin Wolf <kwolf@redhat.com> wrote:

> Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben:
> > On Thu, 27 Nov 2014 10:30:33 +0100
> > Max Reitz <mreitz@redhat.com> wrote:
> > 
> > > On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> > > > Currently the qemu-iotest framework is focused on the x86 platform. The suite should be
> > > > usable by other platforms as well. To enable multi-platform usage, this patch set enhances
> > > > the framework scripts to address this. By using the default machine type of the platform
> > > > one can add specific output files if it deviates from the default. Secondly, single test
> > > > cases can be adjusted as well when e.g. devices have different names or are not supported
> > > > at all.
> > > >
> > > > Mao Chuan Li (9):
> > > >    qemu-iotests: run qemu with -nodefaults
> > > >    qemu-iotests: qemu machine type support
> > > >    qemu-iotests: add core_pattern access functions
> > > >    qemu-iotests: fix test 039
> > > 
> > > >    qemu-iotests: s390x: fix test 071
> > > >    qemu-iotests: s390x: fix test 087
> > > 
> > > To me, the main difference between the current test output and the new 
> > > s390-specific seems to be lines about CD and floppy disk; due to patch 
> > > 1, they are gone from x86 as well, though. Therefore, we don't need 
> > > special s390 output, but need to apply the changes directly to 071.out 
> > > and 087.out.
> > 
> > perfect, that's fully in our interest.
> > 
> > > 
> > > Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
> > > don't know why 091 fails, but 067 fails because CD and floppy are 
> > > missing from the block-query result and the DEVICE_TRAY_MOVED events are 
> > > missing from QMP output in general (which is completely fine, we just 
> > > need to adjust the reference output accordingly).
> > > 
> > > Max
> > > 
> > > >    qemu-iotests: s390x: fix test 041
> > > >    qemu-iotests: s390x: fix test 055
> > > >    qemu-iotests: s390x: fix test 051
> > > 
> > 
> > We have two more test 060 and 082 that fail with the following difference to
> > the reference output. We analyzed it and it turns out that the size on disk is
> > file system dependent. In our case it ran on a s390/ext3. Thus we think comparing
> > the size on disk should be filtered. With other file system like ext4 or tmpfs we
> > get also 196K. We don't want to enforce a specific file system to be used.    
> > 
> > 060         - output mismatch (see 060.out.bad)
> > --- /home/mimu/prog/qemu/tests/qemu-iotests/060.out	2014-11-07 09:34:09.106410738 +0100
> > +++ 060.out.bad	2014-11-27 11:32:43.342907638 +0100
> > @@ -14,7 +14,7 @@
> >  image: TEST_DIR/t.qcow2
> >  file format: qcow2
> >  virtual size: 64M (67108864 bytes)
> > -disk size: 196K
> > +disk size: 200K
> >  cluster_size: 65536
> >  Format specific information:
> >      compat: 1.1
> > 
> > Would this be excaptable with replacing the out file
> > 
> > diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
> > index 9772d36..3f608ed 100755
> > --- a/tests/qemu-iotests/060
> > +++ b/tests/qemu-iotests/060
> > @@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
> >  $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
> >  
> >  # This information should be available through qemu-img info
> > -$QEMU_IMG info "$TEST_IMG" | _filter_testdir
> > +$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
> 
> _img_info already filters the size out. The reason why it isn't used
> here is that it also filters all of the format specific information out.
> We could probably make that part optional and then reuse it here.
> 
> Kevin

I'm not sure if this is the better solution then because one has to use a
new global variable to provide the parameter:

diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 3f608ed..5978336 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
 $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
 
 # This information should be available through qemu-img info
-$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
+args=ups _img_info | _filter_testdir
 
 # Try to open the image R/W (which should fail)
 $QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 87edf36..418c36f 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -213,6 +213,11 @@ _check_test_img()
 
 _img_info()
 {
+    if [ -n "$args" ]; then
+       $QEMU_IMG info "$@" "$TEST_IMG" 2>&1 | \
+            sed -e "/^disk size:/ D"
+       return
+    fi
     discard=0
     regex_json_spec_start='^ *"format-specific": \{'
     $QEMU_IMG info "$@" "$TEST_IMG" 2>&1 | \


> 

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-27 13:34       ` Michael Mueller
@ 2014-11-27 14:03         ` Kevin Wolf
  2014-11-27 14:09           ` Kevin Wolf
  0 siblings, 1 reply; 20+ messages in thread
From: Kevin Wolf @ 2014-11-27 14:03 UTC (permalink / raw)
  To: Michael Mueller
  Cc: Mao Chuan Li, Alexander Graf, qemu-devel, Christian Borntraeger,
	Stefan Hajnoczi, Cornelia Huck, Max Reitz

Am 27.11.2014 um 14:34 hat Michael Mueller geschrieben:
> On Thu, 27 Nov 2014 12:27:56 +0100
> Kevin Wolf <kwolf@redhat.com> wrote:
> 
> > Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben:
> > > On Thu, 27 Nov 2014 10:30:33 +0100
> > > Max Reitz <mreitz@redhat.com> wrote:
> > > 
> > > > On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> > > > > Currently the qemu-iotest framework is focused on the x86 platform. The suite should be
> > > > > usable by other platforms as well. To enable multi-platform usage, this patch set enhances
> > > > > the framework scripts to address this. By using the default machine type of the platform
> > > > > one can add specific output files if it deviates from the default. Secondly, single test
> > > > > cases can be adjusted as well when e.g. devices have different names or are not supported
> > > > > at all.
> > > > >
> > > > > Mao Chuan Li (9):
> > > > >    qemu-iotests: run qemu with -nodefaults
> > > > >    qemu-iotests: qemu machine type support
> > > > >    qemu-iotests: add core_pattern access functions
> > > > >    qemu-iotests: fix test 039
> > > > 
> > > > >    qemu-iotests: s390x: fix test 071
> > > > >    qemu-iotests: s390x: fix test 087
> > > > 
> > > > To me, the main difference between the current test output and the new 
> > > > s390-specific seems to be lines about CD and floppy disk; due to patch 
> > > > 1, they are gone from x86 as well, though. Therefore, we don't need 
> > > > special s390 output, but need to apply the changes directly to 071.out 
> > > > and 087.out.
> > > 
> > > perfect, that's fully in our interest.
> > > 
> > > > 
> > > > Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
> > > > don't know why 091 fails, but 067 fails because CD and floppy are 
> > > > missing from the block-query result and the DEVICE_TRAY_MOVED events are 
> > > > missing from QMP output in general (which is completely fine, we just 
> > > > need to adjust the reference output accordingly).
> > > > 
> > > > Max
> > > > 
> > > > >    qemu-iotests: s390x: fix test 041
> > > > >    qemu-iotests: s390x: fix test 055
> > > > >    qemu-iotests: s390x: fix test 051
> > > > 
> > > 
> > > We have two more test 060 and 082 that fail with the following difference to
> > > the reference output. We analyzed it and it turns out that the size on disk is
> > > file system dependent. In our case it ran on a s390/ext3. Thus we think comparing
> > > the size on disk should be filtered. With other file system like ext4 or tmpfs we
> > > get also 196K. We don't want to enforce a specific file system to be used.    
> > > 
> > > 060         - output mismatch (see 060.out.bad)
> > > --- /home/mimu/prog/qemu/tests/qemu-iotests/060.out	2014-11-07 09:34:09.106410738 +0100
> > > +++ 060.out.bad	2014-11-27 11:32:43.342907638 +0100
> > > @@ -14,7 +14,7 @@
> > >  image: TEST_DIR/t.qcow2
> > >  file format: qcow2
> > >  virtual size: 64M (67108864 bytes)
> > > -disk size: 196K
> > > +disk size: 200K
> > >  cluster_size: 65536
> > >  Format specific information:
> > >      compat: 1.1
> > > 
> > > Would this be excaptable with replacing the out file
> > > 
> > > diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
> > > index 9772d36..3f608ed 100755
> > > --- a/tests/qemu-iotests/060
> > > +++ b/tests/qemu-iotests/060
> > > @@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
> > >  $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
> > >  
> > >  # This information should be available through qemu-img info
> > > -$QEMU_IMG info "$TEST_IMG" | _filter_testdir
> > > +$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
> > 
> > _img_info already filters the size out. The reason why it isn't used
> > here is that it also filters all of the format specific information out.
> > We could probably make that part optional and then reuse it here.
> > 
> > Kevin
> 
> I'm not sure if this is the better solution then because one has to use a
> new global variable to provide the parameter:

I was thinking along the lines of this (which leaves most of
the filtering in place, it just doesn't strip the format-specific
information):

diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 9772d36..73863bf 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
 $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
 
 # This information should be available through qemu-img info
-$QEMU_IMG info "$TEST_IMG" | _filter_testdir
+_img_info --format-specific
 
 # Try to open the image R/W (which should fail)
 $QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 9c49deb..89cbc13 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -213,6 +213,13 @@ _check_test_img()
 
 _img_info()
 {
+    if [[ "$1" == "--format-specific" ]]; then
+        local format_specific=1
+        shift
+    else
+        local format_specific=0
+    fi
+
     discard=0
     regex_json_spec_start='^ *"format-specific": \{'
     $QEMU_IMG info "$@" "$TEST_IMG" 2>&1 | \
@@ -222,7 +229,9 @@ _img_info()
             -e "/^disk size:/ D" \
             -e "/actual-size/ D" | \
         while IFS='' read line; do
-            if [[ $line == "Format specific information:" ]]; then
+            if [[ $format_specific == 1 ]]; then
+                discard=0
+            elif [[ $line == "Format specific information:" ]]; then
                 discard=1
             elif [[ $line =~ $regex_json_spec_start ]]; then
                 discard=2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
  2014-11-27 14:03         ` Kevin Wolf
@ 2014-11-27 14:09           ` Kevin Wolf
  0 siblings, 0 replies; 20+ messages in thread
From: Kevin Wolf @ 2014-11-27 14:09 UTC (permalink / raw)
  To: Michael Mueller
  Cc: Mao Chuan Li, Alexander Graf, qemu-devel, Christian Borntraeger,
	Stefan Hajnoczi, Cornelia Huck, Max Reitz

Am 27.11.2014 um 15:03 hat Kevin Wolf geschrieben:
> Am 27.11.2014 um 14:34 hat Michael Mueller geschrieben:
> > On Thu, 27 Nov 2014 12:27:56 +0100
> > Kevin Wolf <kwolf@redhat.com> wrote:
> > 
> > > Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben:
> > > > On Thu, 27 Nov 2014 10:30:33 +0100
> > > > Max Reitz <mreitz@redhat.com> wrote:
> > > > 
> > > > > On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> > > > > > Currently the qemu-iotest framework is focused on the x86 platform. The suite should be
> > > > > > usable by other platforms as well. To enable multi-platform usage, this patch set enhances
> > > > > > the framework scripts to address this. By using the default machine type of the platform
> > > > > > one can add specific output files if it deviates from the default. Secondly, single test
> > > > > > cases can be adjusted as well when e.g. devices have different names or are not supported
> > > > > > at all.
> > > > > >
> > > > > > Mao Chuan Li (9):
> > > > > >    qemu-iotests: run qemu with -nodefaults
> > > > > >    qemu-iotests: qemu machine type support
> > > > > >    qemu-iotests: add core_pattern access functions
> > > > > >    qemu-iotests: fix test 039
> > > > > 
> > > > > >    qemu-iotests: s390x: fix test 071
> > > > > >    qemu-iotests: s390x: fix test 087
> > > > > 
> > > > > To me, the main difference between the current test output and the new 
> > > > > s390-specific seems to be lines about CD and floppy disk; due to patch 
> > > > > 1, they are gone from x86 as well, though. Therefore, we don't need 
> > > > > special s390 output, but need to apply the changes directly to 071.out 
> > > > > and 087.out.
> > > > 
> > > > perfect, that's fully in our interest.
> > > > 
> > > > > 
> > > > > Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
> > > > > don't know why 091 fails, but 067 fails because CD and floppy are 
> > > > > missing from the block-query result and the DEVICE_TRAY_MOVED events are 
> > > > > missing from QMP output in general (which is completely fine, we just 
> > > > > need to adjust the reference output accordingly).
> > > > > 
> > > > > Max
> > > > > 
> > > > > >    qemu-iotests: s390x: fix test 041
> > > > > >    qemu-iotests: s390x: fix test 055
> > > > > >    qemu-iotests: s390x: fix test 051
> > > > > 
> > > > 
> > > > We have two more test 060 and 082 that fail with the following difference to
> > > > the reference output. We analyzed it and it turns out that the size on disk is
> > > > file system dependent. In our case it ran on a s390/ext3. Thus we think comparing
> > > > the size on disk should be filtered. With other file system like ext4 or tmpfs we
> > > > get also 196K. We don't want to enforce a specific file system to be used.    
> > > > 
> > > > 060         - output mismatch (see 060.out.bad)
> > > > --- /home/mimu/prog/qemu/tests/qemu-iotests/060.out	2014-11-07 09:34:09.106410738 +0100
> > > > +++ 060.out.bad	2014-11-27 11:32:43.342907638 +0100
> > > > @@ -14,7 +14,7 @@
> > > >  image: TEST_DIR/t.qcow2
> > > >  file format: qcow2
> > > >  virtual size: 64M (67108864 bytes)
> > > > -disk size: 196K
> > > > +disk size: 200K
> > > >  cluster_size: 65536
> > > >  Format specific information:
> > > >      compat: 1.1
> > > > 
> > > > Would this be excaptable with replacing the out file
> > > > 
> > > > diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
> > > > index 9772d36..3f608ed 100755
> > > > --- a/tests/qemu-iotests/060
> > > > +++ b/tests/qemu-iotests/060
> > > > @@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
> > > >  $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
> > > >  
> > > >  # This information should be available through qemu-img info
> > > > -$QEMU_IMG info "$TEST_IMG" | _filter_testdir
> > > > +$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
> > > 
> > > _img_info already filters the size out. The reason why it isn't used
> > > here is that it also filters all of the format specific information out.
> > > We could probably make that part optional and then reuse it here.
> > > 
> > > Kevin
> > 
> > I'm not sure if this is the better solution then because one has to use a
> > new global variable to provide the parameter:
> 
> I was thinking along the lines of this (which leaves most of
> the filtering in place, it just doesn't strip the format-specific
> information):
> [...]

Well, that was almost the complete patch, so I just did the rest as well
and sent out "[PATCH] qemu-iotests: 060: Filter the real disk size".

Kevin

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-11-27 14:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 1/9] qemu-iotests: run qemu with -nodefaults Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 2/9] qemu-iotests: qemu machine type support Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 3/9] qemu-iotests: add core_pattern access functions Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Mao Chuan Li
2014-11-13 15:54   ` Max Reitz
2014-11-25 18:07   ` Michael Mueller
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 5/9] qemu-iotests: s390x: fix test 071 Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 6/9] qemu-iotests: s390x: fix test 087 Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 7/9] qemu-iotests: s390x: fix test 041 Mao Chuan Li
2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 8/9] qemu-iotests: s390x: fix test 055 Mao Chuan Li
2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 9/9] qemu-iotests: s390x: fix test 051 Mao Chuan Li
2014-11-27  9:30 ` [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Max Reitz
2014-11-27  9:45   ` Max Reitz
2014-11-27 11:08   ` Michael Mueller
2014-11-27 11:27     ` Kevin Wolf
2014-11-27 13:34       ` Michael Mueller
2014-11-27 14:03         ` Kevin Wolf
2014-11-27 14:09           ` Kevin Wolf
     [not found] <1416470936.23362.1.camel@maoLaptop.cn.ibm.com>
2014-11-20  8:45 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).