[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/7] iotests: string substitution order in _filter_img_create_fil
From: |
Stefan Hajnoczi |
Subject: |
[PATCH 3/7] iotests: string substitution order in _filter_img_create_filenames |
Date: |
Tue, 25 Jul 2023 10:19:11 -0400 |
_filter_img_create_filenames fails to remove $IMGPROTO: when
$REMOTE_TEST_DIR matches. echo "$IMGPROTO:$REMOTE_TEST_DIR" |
_filter_img_create_filenames results in "$IMGPROTO:TEST_DIR" instead of
"TEST_DIR".
Substitute "s#$REMOTE_TEST_DIR#TEST_DIR#g" after
"s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" since the latter matches $TEST_DIR.
This way echo "$IMGPROTO:$REMOTE_TEST_DIR" |
_filter_img_create_filenames results in "TEST_DIR" as expected.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/qemu-iotests/common.filter | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index fc3c64bcb8..4acac16c52 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -125,8 +125,8 @@ _filter_actual_image_size()
_filter_img_create_filenames()
{
sed \
+ -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \
-e "s#$REMOTE_TEST_DIR#TEST_DIR#g" \
- -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \
-e "s#$TEST_DIR#TEST_DIR#g" \
-e "s#$SOCK_DIR#SOCK_DIR#g" \
-e 's#SOCK_DIR/fuse-#TEST_DIR/#g' \
--
2.41.0
- [PATCH 0/7] iotests: add -io_uring support, Stefan Hajnoczi, 2023/07/25
- [PATCH 1/7] block/blkio: add io_uring: filename parsing, Stefan Hajnoczi, 2023/07/25
- [PATCH 2/7] block/blkio: add "simple" creation support, Stefan Hajnoczi, 2023/07/25
- [PATCH 4/7] iotests: filter img create backing_file when IMGPROTO is modified, Stefan Hajnoczi, 2023/07/25
- [PATCH 3/7] iotests: string substitution order in _filter_img_create_filenames,
Stefan Hajnoczi <=
- [PATCH 6/7] iotests: add io_uring to supported protocols in 012, Stefan Hajnoczi, 2023/07/25
- [PATCH 5/7] iotests: add -io_uring support, Stefan Hajnoczi, 2023/07/25
- [PATCH 7/7] iotests: add io_uring to supported protocols in 052, Stefan Hajnoczi, 2023/07/25