[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-6.0 v3 15/20] iotests/287: Clean up subshell test image
From: |
Max Reitz |
Subject: |
[PATCH for-6.0 v3 15/20] iotests/287: Clean up subshell test image |
Date: |
Tue, 27 Oct 2020 20:05:55 +0100 |
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>
---
tests/qemu-iotests/287 | 4 ++--
1 file 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
--
2.26.2
- [PATCH for-6.0 v3 05/20] fuse: (Partially) implement fallocate(), (continued)
- [PATCH for-6.0 v3 05/20] fuse: (Partially) implement fallocate(), Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 06/20] fuse: Implement hole detection through lseek, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 07/20] iotests: Do not needlessly filter _make_test_img, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 08/20] iotests: Do not pipe _make_test_img, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 09/20] iotests: Use convert -n in some cases, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 10/20] iotests/046: Avoid renaming images, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 12/20] iotests/091: Use _cleanup_qemu instad of "wait", Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 11/20] iotests: Derive image names from $TEST_IMG, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 13/20] iotests: Restrict some Python tests to file, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 14/20] iotests: Let _make_test_img guess $TEST_IMG_FILE, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 15/20] iotests/287: Clean up subshell test image,
Max Reitz <=
- [PATCH for-6.0 v3 16/20] storage-daemon: Call bdrv_close_all() on exit, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 17/20] iotests: Give access to the qemu-storage-daemon, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 18/20] iotests: Allow testing FUSE exports, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 20/20] iotests/308: Add test for FUSE exports, Max Reitz, 2020/10/27
- [PATCH for-6.0 v3 19/20] iotests: Enable fuse for many tests, Max Reitz, 2020/10/27