Bug 1026524 - Backport block layer error parameter patches
Backport block layer error parameter patches
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Max Reitz
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-04 16:47 EST by Max Reitz
Modified: 2014-06-17 23:40 EDT (History)
7 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-16.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:22:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Max Reitz 2013-11-04 16:47:13 EST
There are upstream patches adding an error parameter bdrv_open, bdrv_file_open and bdrv_create. Backporting those will result in more specific error messages, first of all; and second, this makes backporting of future patches easier, since many will rely on those functions using such an error parameter.
Comment 2 Miroslav Rezanina 2013-11-07 09:25:11 EST
Fix included in qemu-kvm-1.5.3-16.el7
Comment 4 Sibiao Luo 2013-12-23 23:48:57 EST
Hi Max,
 
   Could you help provide a method for QE to verify this bug, and give some explains for the error parameter bdrv_open, bdrv_file_open and bdrv_create. thanks in advance.

Best Regards,
sluo
Comment 5 Max Reitz 2013-12-28 17:29:04 EST
Hi Sibiao,

Hm, since this is not actually a bug but rather something which enhances usability and allows for cleaner backports, it is rather difficult to quantify the change.

The downstream commit aaf2d00ea8cd6479c5dd15773660e0699472af1c (upstream 2c78857bf6a9b5d06e17533b8f40fee14e087987) shows some examples of error messages  before and after. As you can see, sometimes two lines of error messages are combined into a single one, and sometimes a single error message exhibits greater detail.

The error parameter primarily allows passing error messages from these functions to the callers. This is useful since one often wants to know the reason when opening an image/block device fails (which may be rather complex in the case of qemu and its block device layers). That way, the whole stack of block devices may build up an error message which explains the failure in (potentially) great detail. This is vastly superior to just passing on an integer vaguely describing the kind of error which occured (this does not even allow to spot where the failure actually originated).

I hope that helps, kind regards,

Max
Comment 6 Shaolong Hu 2014-01-28 05:08:39 EST
To verify this bug, run qemu-iotests suite, the patch sets touch:

diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
diff --git a/tests/qemu-iotests/049.out b/tests/qemu-iotests/049.out
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
diff --git a/tests/qemu-iotests/063 b/tests/qemu-iotests/063
diff --git a/tests/qemu-iotests/063.out b/tests/qemu-iotests/063.out
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group


Above tests are key tests, however i will run all tests, both for qcow2 and raw, update the result later.
Comment 7 Shaolong Hu 2014-01-28 05:13:33 EST
for qcow2:

Not run: 006 016 045 059 064 070
Failures: 030 041 067
Failed 3 of 58 tests
Comment 8 Shaolong Hu 2014-01-28 05:14:31 EST
for raw:

Not run: 006 007 013 014 015 017 018 019 020 022 023 024 026 027 028 029 030 031 034 035 036 037 038 039 040 041 042 043 044 046 047 049 050 051 053 054 059 060 061 062 064 065 067 068 070
Passed all 19 tests
Comment 9 Shaolong Hu 2014-01-28 06:22:07 EST
[root@localhost qemu-iotests]# ./check -qcow2 030
QEMU          -- /usr/bin/qemu
QEMU_IMG      -- /usr/bin/qemu-img
QEMU_IO       -- /usr/bin/qemu-io 
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 localhost 3.10.0-65.el7.x86_64

030         [failed, exit status 1] - output mismatch (see 030.out.bad)
--- 030.out	2014-01-28 17:04:18.275625777 +0800
+++ 030.out.bad	2014-01-28 19:20:23.947242377 +0800
@@ -1,5 +1,75 @@
-.............
+EEEEE........
+======================================================================
+ERROR: test_enospc (__main__.TestEIO)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./030", line 233, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_ignore (__main__.TestEIO)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./030", line 233, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_report (__main__.TestEIO)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./030", line 233, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_stop (__main__.TestEIO)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./030", line 233, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_enospc (__main__.TestENOSPC)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./030", line 369, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
 ----------------------------------------------------------------------
 Ran 13 tests
 
-OK
+FAILED (errors=5)
Failures: 030
Failed 1 of 1 tests
[root@localhost qemu-iotests]# rpm -q qemu-kvm
package qemu-kvm is not installed
[root@localhost qemu-iotests]# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-1.5.3-43.el7.x86_64
Comment 10 Shaolong Hu 2014-01-28 06:23:09 EST
[root@localhost qemu-iotests]# ./check -qcow2 041
QEMU          -- /usr/bin/qemu
QEMU_IMG      -- /usr/bin/qemu-img
QEMU_IO       -- /usr/bin/qemu-io 
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 localhost 3.10.0-65.el7.x86_64

041         [failed, exit status 1] - output mismatch (see 041.out.bad)
--- 041.out	2014-01-28 17:04:18.277625735 +0800
+++ 041.out.bad	2014-01-28 19:22:41.142308514 +0800
@@ -1,5 +1,97 @@
-...........................
+.....EEEE...............FFF
+======================================================================
+ERROR: test_ignore_read (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_large_cluster (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_report_read (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_stop_read (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+FAIL: test_ignore_write (__main__.TestWriteErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 626, in test_ignore_write
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "{u'error': {u'class': u'GenericError', u'desc': u"Driver 'blkdebug' is not whitelisted"}}"
+
+======================================================================
+FAIL: test_report_write (__main__.TestWriteErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 597, in test_report_write
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "{u'error': {u'class': u'GenericError', u'desc': u"Driver 'blkdebug' is not whitelisted"}}"
+
+======================================================================
+FAIL: test_stop_write (__main__.TestWriteErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 643, in test_stop_write
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "{u'error': {u'class': u'GenericError', u'desc': u"Driver 'blkdebug' is not whitelisted"}}"
+
 ----------------------------------------------------------------------
 Ran 27 tests
 
-OK
+FAILED (failures=3, errors=4)
Failures: 041
Failed 1 of 1 tests
Comment 11 Shaolong Hu 2014-01-28 06:24:15 EST
[root@localhost qemu-iotests]# ./check -qcow2 067
QEMU          -- /usr/bin/qemu
QEMU_IMG      -- /usr/bin/qemu-img
QEMU_IO       -- /usr/bin/qemu-io 
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 localhost 3.10.0-65.el7.x86_64

067         - output mismatch (see 067.out.bad)
--- 067.out	2014-01-28 17:04:18.280625672 +0800
+++ 067.out.bad	2014-01-28 19:23:42.575995841 +0800
@@ -6,7 +6,7 @@
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk -device virtio-blk-pci,drive=disk,id=virtio0
 QMP_VERSION
 {"return": {}}
-{"return": [{"io-status": "ok", "device": "disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 139264, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]}
+{"return": [{"io-status": "ok", "device": "disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]}
 {"return": {}}
 {"return": {}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio0/virtio-backend"}}
@@ -24,7 +24,7 @@
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk
 QMP_VERSION
 {"return": {}}
-{"return": [{"device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 139264, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]}
+{"return": [{"device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]}
 {"return": {}}
 {"return": {}}
 {"return": {}}
@@ -44,7 +44,7 @@
 QMP_VERSION
 {"return": {}}
 {"return": "OK\r\n"}
-{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 139264, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]}
+{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]}
 {"return": {}}
 {"return": {}}
 {"return": {}}
@@ -64,14 +64,14 @@
 QMP_VERSION
 {"return": {}}
 {"return": {}}
-{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 139264, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]}
+{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]}
 {"return": {}}
 {"return": {}}
 {"return": {}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio0/virtio-backend"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"device": "virtio0", "path": "/machine/peripheral/virtio0"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "RESET"}
-{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 139264, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]}
+{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]}
 {"return": {}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
Failures: 067
Failed 1 of 1 tests
Comment 12 Shaolong Hu 2014-01-28 06:49:17 EST
Test with qemu-kvm-1.5.3-15.el7, test 030 and 067 also fail, error is the same with qemu-kvm-1.5.3-43.el7, test 40 also fails but error is a little different:


[root@localhost qemu-iotests]# ./check -qcow2 041
QEMU          -- /usr/bin/qemu
QEMU_IMG      -- /usr/bin/qemu-img
QEMU_IO       -- /usr/bin/qemu-io 
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 localhost 3.10.0-65.el7.x86_64

041         [failed, exit status 1] - output mismatch (see 041.out.bad)
--- 041.out	2014-01-28 19:42:55.240465098 +0800
+++ 041.out.bad	2014-01-28 19:45:28.445179837 +0800
@@ -1,5 +1,117 @@
-...........................
+.....EEEE.............FE.FFF
+======================================================================
+ERROR: test_ignore_read (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_large_cluster (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_report_read (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_stop_read (__main__.TestReadErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 433, in setUp
+    self.vm.launch()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 106, in launch
+    self._qmp.accept()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 100, in accept
+    return self.__negotiate_capabilities()
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/../../QMP/qmp.py", line 54, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: test_absolute_paths_none (__main__.TestUnbackedSource)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 751, in tearDown
+    os.remove(target_img)
+OSError: [Errno 2] No such file or directory: '/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img'
+
+======================================================================
+FAIL: test_absolute_paths_none (__main__.TestUnbackedSource)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 776, in test_absolute_paths_none
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
+======================================================================
+FAIL: test_ignore_write (__main__.TestWriteErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 626, in test_ignore_write
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "{u'error': {u'class': u'GenericError', u'desc': u"Could not open 'blkdebug:/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img.blkdebug:/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img': Operation not supported"}}"
+
+======================================================================
+FAIL: test_report_write (__main__.TestWriteErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 597, in test_report_write
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "{u'error': {u'class': u'GenericError', u'desc': u"Could not open 'blkdebug:/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img.blkdebug:/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img': Operation not supported"}}"
+
+======================================================================
+FAIL: test_stop_write (__main__.TestWriteErrors)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "./041", line 643, in test_stop_write
+    self.assert_qmp(result, 'return', {})
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 174, in assert_qmp
+    result = self.dictpath(d, path)
+  File "/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/iotests.py", line 153, in dictpath
+    self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "{u'error': {u'class': u'GenericError', u'desc': u"Could not open 'blkdebug:/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img.blkdebug:/root/qemu-rhel7/qemu-kvm/tests/qemu-iotests/scratch/target.img': Operation not supported"}}"
+
 ----------------------------------------------------------------------
 Ran 27 tests
 
-OK
+FAILED (failures=4, errors=5)
Failures: 041
Failed 1 of 1 tests
Comment 13 Shaolong Hu 2014-01-28 06:53:29 EST
Here comes the conclusion, test 030, 041, 067 fail with both qemu-kvm-1.5.3-16.el7 and latest qemu-kvm-1.5.3-43.el7, just error of 041 has a little difference:

qemu-kvm-1.5.3-16.el7 
+FAILED (failures=4, errors=5)

qemu-kvm-1.5.3-43.el7
+FAILED (failures=3, errors=4)


If anyone can have look at this and tell me it is nothing to do with the patch set, i am willing to set this one verified.

Bests,
Comment 14 juzhang 2014-02-06 19:56:35 EST
Hi Max,

Could you have a look comment13 and give QE feedback?

Best Regards,
Junyi
Comment 15 Max Reitz 2014-02-07 17:15:26 EST
Hi,

Backporting the upstream commit 64815e2a966f0a3f18818b9d542f1ef02dc992a2 fixes test 067. This is unrelated to this patch set.

041 just works for me.

For 030… For me, it seems a bit indeterministic. Sometimes it works, most of the time it does not. There are upstream patches to fix exactly that, but backporting those does not help for me.

Furthermore, the error message I receive (if it occurs) is twice “image file map does not match backing file after streaming”, once in test_stream and once in test_stream_pause; this is different from the one reported in comment 9. Generally, all the error messages from comments 9 and 10 are either a QMPConnectError or “Driver 'blkdebug' is not whitelisted”. Both do not appear for me, and if they would appear, they are most likely completely unrelated to this patch set.

This patch set should at the most change error messages; tests failing due to this would report different error messages than expected, which is not the case here.

So, all in all, test 067 could easily fixed but fails due to something unrelated to this patch set. Test 041 works for me and 030 fails due to a different reason than reported in comment 9. However, both the issues reported in comments 9 and 10 and the ones I am seeing here are, in my opinion, unrelated to the patch set for this bug and would have to be fixed separately.

Max
Comment 16 juzhang 2014-02-13 01:09:06 EST
Thanks Max.

Hi Shu,

Could you have a look comment15? Any new question, please ask Max directly.

Best Regards,
Junyi
Comment 17 Shaolong Hu 2014-02-24 00:58:39 EST
Yes, according to Comment 15, i think we can set this one verified.
Comment 18 Ludek Smid 2014-06-13 05:22:07 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.