aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/060
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2018-06-20 15:32:20 +0800
committerMarkus Armbruster <armbru@redhat.com>2018-06-30 17:50:48 +0200
commitcbc4ae2d1a9f4a9fd6c2f5000d3845f6d28cccc1 (patch)
treeb85a2be596470710368c4431544e69f50127ba89 /tests/qemu-iotests/060
parentc73a843b4a822dc0bd5df5ef38dbd681dd96ad25 (diff)
downloadqemu-cbc4ae2d1a9f4a9fd6c2f5000d3845f6d28cccc1.zip
qemu-cbc4ae2d1a9f4a9fd6c2f5000d3845f6d28cccc1.tar.gz
qemu-cbc4ae2d1a9f4a9fd6c2f5000d3845f6d28cccc1.tar.bz2
tests: iotests: drop some stderr line
In my Out-Of-Band test, "check -qcow2 060" fail with this: --- /home/peterx/git/qemu/tests/qemu-iotests/060.out +++ /home/peterx/git/qemu/bin/tests/qemu-iotests/060.out.bad @@ -427,8 +427,8 @@ QMP_VERSION {"return": {}} qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further non-fatal corruption events will be suppressed -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a0 0 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} read failed: Input/output error +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a0 0 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} {"return": ""} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}} The order of the event and the in/out error line is swapped. I didn't dig up the reason, but AFAIU what we want to verify is the event rather than stderr. Let's drop the stderr line directly for this test. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180620073223.31964-5-peterx@redhat.com> [Commit message touched up] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/060')
-rwxr-xr-xtests/qemu-iotests/06010
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 7bdf609..74ad371 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -33,6 +33,14 @@ _cleanup()
}
trap "_cleanup; exit \$status" 0 1 2 3 15
+# Sometimes the error line might be dumped before/after an event
+# randomly. Mask it out for specific test that may trigger this
+# uncertainty for current test for now.
+_filter_io_error()
+{
+ sed '/Input\/output error/d'
+}
+
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
@@ -464,7 +472,7 @@ echo "{'execute': 'qmp_capabilities'}
}}" \
-incoming exec:'cat /dev/null' \
2>&1 \
- | _filter_qmp | _filter_qemu_io
+ | _filter_qmp | _filter_qemu_io | _filter_io_error
echo
# Image should not have been marked corrupt