diff options
author | Max Reitz | 2020-10-27 20:05:55 +0100 |
---|---|---|
committer | Kevin Wolf | 2020-12-11 17:52:40 +0100 |
commit | 7eadb1e59d331563ad6a1c3efd5ce14357de7344 (patch) | |
tree | 7e0d97f21eb230d8174bbd91915b5a548cb472b8 /tests | |
parent | iotests: Let _make_test_img guess $TEST_IMG_FILE (diff) | |
download | qemu-7eadb1e59d331563ad6a1c3efd5ce14357de7344.tar.gz qemu-7eadb1e59d331563ad6a1c3efd5ce14357de7344.tar.xz qemu-7eadb1e59d331563ad6a1c3efd5ce14357de7344.zip |
iotests/287: Clean up subshell test image
287 creates an image in a subshell (thanks to the pipe) to see whether
that is possible with compression_type=zstd. If _make_test_img were to
modify any global state, this global state would then be lost before we
could cleanup the image.
When using FUSE as the test protocol, this global state is important, so
clean up the image before the state is lost.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027190600.192171-16-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/287 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/287 b/tests/qemu-iotests/287 index f98a4cadc1..036cc09e82 100755 --- a/tests/qemu-iotests/287 +++ b/tests/qemu-iotests/287 @@ -51,8 +51,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 CLUSTER_SIZE=65536 # Check if we can run this test. -if IMGOPTS='compression_type=zstd' _make_test_img 64M | - grep "Invalid parameter 'zstd'"; then +output=$(_make_test_img -o 'compression_type=zstd' 64M; _cleanup_test_img) +if echo "$output" | grep -q "Invalid parameter 'zstd'"; then _notrun "ZSTD is disabled" fi |