9ae3a8
From b1ee83f0ffaac613717792a9681b0f1f79fcc108 Mon Sep 17 00:00:00 2001
9ae3a8
From: Max Reitz <mreitz@redhat.com>
9ae3a8
Date: Sun, 29 Dec 2013 22:06:55 +0100
9ae3a8
Subject: [PATCH 4/8] qemu-iotests: Remaining error propagation adjustments
9ae3a8
9ae3a8
RH-Author: Max Reitz <mreitz@redhat.com>
9ae3a8
Message-id: <1388354817-3013-4-git-send-email-mreitz@redhat.com>
9ae3a8
Patchwork-id: 56445
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH 3/5] qemu-iotests: Remaining error propagation adjustments
9ae3a8
Bugzilla: 1004347
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
RH-Acked-by: Fam Zheng <famz@redhat.com>
9ae3a8
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
9ae3a8
BZ: 1004347
9ae3a8
9ae3a8
This downstream-only patch contains the hunks which have been omitted
9ae3a8
when aaf2d00ea8cd6479c5dd15773660e0699472af1c was cherry-picked from
9ae3a8
2c78857bf6a9b5d06e17533b8f40fee14e087987, i.e., fixes tests 054 and 060.
9ae3a8
9ae3a8
Furthermore, this sets the executable bit for the tests 060, 063 and 067
9ae3a8
(which, for some reason, have been cleared until now).
9ae3a8
9ae3a8
Signed-off-by: Max Reitz <mreitz@redhat.com>
9ae3a8
---
9ae3a8
 tests/qemu-iotests/054.out | 4 ++--
9ae3a8
 tests/qemu-iotests/060     | 2 +-
9ae3a8
 tests/qemu-iotests/060.out | 3 +--
9ae3a8
 tests/qemu-iotests/063     | 0
9ae3a8
 tests/qemu-iotests/067     | 0
9ae3a8
 5 files changed, 4 insertions(+), 5 deletions(-)
9ae3a8
 mode change 100644 => 100755 tests/qemu-iotests/060
9ae3a8
 mode change 100644 => 100755 tests/qemu-iotests/063
9ae3a8
 mode change 100644 => 100755 tests/qemu-iotests/067
9ae3a8
9ae3a8
diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
9ae3a8
old mode 100644
9ae3a8
new mode 100755
9ae3a8
index 65bb09f..9bbc43b
9ae3a8
diff --git a/tests/qemu-iotests/063 b/tests/qemu-iotests/063
9ae3a8
old mode 100644
9ae3a8
new mode 100755
9ae3a8
diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067
9ae3a8
old mode 100644
9ae3a8
new mode 100755
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 tests/qemu-iotests/054.out |    4 ++--
9ae3a8
 tests/qemu-iotests/060     |    2 +-
9ae3a8
 tests/qemu-iotests/060.out |    3 +--
9ae3a8
 3 files changed, 4 insertions(+), 5 deletions(-)
9ae3a8
9ae3a8
diff --git a/tests/qemu-iotests/054.out b/tests/qemu-iotests/054.out
9ae3a8
index 0b2fe30..7161d6e 100644
9ae3a8
--- a/tests/qemu-iotests/054.out
9ae3a8
+++ b/tests/qemu-iotests/054.out
9ae3a8
@@ -1,10 +1,10 @@
9ae3a8
 QA output created by 054
9ae3a8
 
9ae3a8
 creating too large image (1 EB)
9ae3a8
-qemu-img: The image size is too large for file format 'qcow2'
9ae3a8
+qemu-img: TEST_DIR/t.IMGFMT: The image size is too large for file format 'IMGFMT' (try using a larger cluster size)
9ae3a8
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1152921504606846976 
9ae3a8
 
9ae3a8
 creating too large image (1 EB) using qcow2.py
9ae3a8
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=4294967296 
9ae3a8
-qemu-img: Could not open 'TEST_DIR/t.qcow2': File too large
9ae3a8
+qemu-img: Could not open 'TEST_DIR/t.qcow2': Image is too big
9ae3a8
 *** done
9ae3a8
diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
9ae3a8
index 65bb09f..9bbc43b 100644
9ae3a8
--- a/tests/qemu-iotests/060
9ae3a8
+++ b/tests/qemu-iotests/060
9ae3a8
@@ -71,7 +71,7 @@ $QEMU_IO -c "write -P 0x2a 0 512" "$TEST_IMG" | _filter_qemu_io
9ae3a8
 ./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
9ae3a8
 
9ae3a8
 # Try to open the image R/W (which should fail)
9ae3a8
-$QEMU_IO -c "read 0 512" "$TEST_IMG" 2>&1 | _filter_qemu_io | sed -e "s/can't open device .*$/can't open device/"
9ae3a8
+$QEMU_IO -c "read 0 512" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir | _filter_imgfmt
9ae3a8
 
9ae3a8
 # Try to open it RO (which should succeed)
9ae3a8
 $QEMU_IO -c "read 0 512" -r "$TEST_IMG" | _filter_qemu_io
9ae3a8
diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out
9ae3a8
index ca4583a..648f743 100644
9ae3a8
--- a/tests/qemu-iotests/060.out
9ae3a8
+++ b/tests/qemu-iotests/060.out
9ae3a8
@@ -11,8 +11,7 @@ incompatible_features     0x0
9ae3a8
 qcow2: Preventing invalid write on metadata (overlaps with active L1 table); image marked as corrupt.
9ae3a8
 write failed: Input/output error
9ae3a8
 incompatible_features     0x2
9ae3a8
-qcow2: Image is corrupt; cannot be opened read/write.
9ae3a8
-qemu-io: can't open device
9ae3a8
+qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write
9ae3a8
 no file open, try 'help open'
9ae3a8
 read 512/512 bytes at offset 0
9ae3a8
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8