aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/061
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-09-02 20:52:27 +0200
committerKevin Wolf <kwolf@redhat.com>2015-09-04 20:59:48 +0200
commit934659c460d46c948cf348822fda1d38556ed9a4 (patch)
treeb70041c609aea9532ccc395ebe2cf345f15a9580 /tests/qemu-iotests/061
parent0ed82f7a096537923ef3705946f254d2f61eaf93 (diff)
iotests: Do not suppress segfaults in bash tests
Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a segmentation fault, that message is invisible in most cases since the output is generally filtered and bash suppresses the segmentation fault notice for any but the last element of a pipe. Most of the time, the test will then fail anyway because of missing output, but not necessarily (as happened with test 82 recently). Fix this by making the corresponding environment variables point to wrapper functions which execute the respective command in a subshell. Giving options to qemu/qemu-io/qemu-img and path names with spaces were broken for the Python tests; this patch "accidentally" fixes that. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/061')
-rwxr-xr-xtests/qemu-iotests/0616
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061
index 8d37f8a65c..1df887a01d 100755
--- a/tests/qemu-iotests/061
+++ b/tests/qemu-iotests/061
@@ -58,7 +58,8 @@ echo
echo "=== Testing dirty version downgrade ==="
echo
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
-$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" | _filter_qemu_io
+$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" 2>&1 \
+ | _filter_qemu_io
$PYTHON qcow2.py "$TEST_IMG" dump-header
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
$PYTHON qcow2.py "$TEST_IMG" dump-header
@@ -91,7 +92,8 @@ echo
echo "=== Testing dirty lazy_refcounts=off ==="
echo
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
-$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" | _filter_qemu_io
+$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" 2>&1 \
+ | _filter_qemu_io
$PYTHON qcow2.py "$TEST_IMG" dump-header
$QEMU_IMG amend -o "lazy_refcounts=off" "$TEST_IMG"
$PYTHON qcow2.py "$TEST_IMG" dump-header