[Qemu-devel] [PATCH] qemu-iotests: Treat custom TEST_DIR in 051

Lukáš Doktor posted 1 patch 5 years, 1 month ago
Test docker-clang@ubuntu passed
Test asan passed
Test checkpatch passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190319141726.4830-1-ldoktor@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
There is a newer version of this series
tests/qemu-iotests/051 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[Qemu-devel] [PATCH] qemu-iotests: Treat custom TEST_DIR in 051
Posted by Lukáš Doktor 5 years, 1 month ago
When custom TEST_DIR is specified the output includes it without leading
'/':

    $ TEST_DIR=/var/tmp ./check -file -qcow2 051
    ....
    -drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2", "file": {"driver": "file", "filename": SNAPSHOT_PATH}} (qcow2, read-only)
    +drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/vl.ziHfeP"}} (qcow2, read-only)

Let's remove it from the sed regexp.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
---
 tests/qemu-iotests/051 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 6a3b7c2b89..4430fba5fd 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -358,9 +358,9 @@ TMPDIR=/nonexistent run_qemu -drive driver=null-co,snapshot=on
 
 # Using snapshot=on together with read-only=on
 echo "info block" |
-    run_qemu -drive file="$TEST_IMG",snapshot=on,read-only=on,if=none,id=$device_id |
-    _filter_qemu_io |
-    sed -e 's#"/[^"]*/vl\.[A-Za-z0-9]\{6\}"#SNAPSHOT_PATH#g'
+    run_qemu -drive file="$TEST_IMG",snapshot=on,read-only=on,if=none,id=$device_id | tee /tmp/bbb |
+    _filter_qemu_io | tee /tmp/aaa |
+    sed -e 's#"[^"]*/vl\.[A-Za-z0-9]\{6\}"#SNAPSHOT_PATH#g'
 
 
 # success, all done
-- 
2.20.1


Re: [Qemu-devel] [PATCH] qemu-iotests: Treat custom TEST_DIR in 051
Posted by Lukáš Doktor 5 years, 1 month ago
Dne 19. 03. 19 v 15:17 Lukáš Doktor napsal(a):
> When custom TEST_DIR is specified the output includes it without leading
> '/':
> 
>     $ TEST_DIR=/var/tmp ./check -file -qcow2 051
>     ....
>     -drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2", "file": {"driver": "file", "filename": SNAPSHOT_PATH}} (qcow2, read-only)
>     +drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/vl.ziHfeP"}} (qcow2, read-only)
> 
> Let's remove it from the sed regexp.
> 
> Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
> ---
>  tests/qemu-iotests/051 | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
> index 6a3b7c2b89..4430fba5fd 100755
> --- a/tests/qemu-iotests/051
> +++ b/tests/qemu-iotests/051
> @@ -358,9 +358,9 @@ TMPDIR=/nonexistent run_qemu -drive driver=null-co,snapshot=on
>  
>  # Using snapshot=on together with read-only=on
>  echo "info block" |
> -    run_qemu -drive file="$TEST_IMG",snapshot=on,read-only=on,if=none,id=$device_id |
> -    _filter_qemu_io |
> -    sed -e 's#"/[^"]*/vl\.[A-Za-z0-9]\{6\}"#SNAPSHOT_PATH#g'
> +    run_qemu -drive file="$TEST_IMG",snapshot=on,read-only=on,if=none,id=$device_id | tee /tmp/bbb |
> +    _filter_qemu_io | tee /tmp/aaa |
> +    sed -e 's#"[^"]*/vl\.[A-Za-z0-9]\{6\}"#SNAPSHOT_PATH#g'
>  
>  
>  # success, all done
> 

Oups, I'm sorry I left the debugging "tee" commands here...