iotests: Print full path of bad output if mismatch
PATCH 1/1 iotests: Print full path of bad output if mismatch
So it is easier to copy paste the path.
--- tests/qemu-iotests/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/check +1 -1
@@ -353,7 +353,7 @@ do else echo " - output mismatch (see $seq.out.bad)" mv $tmp.out $seq.out.bad - $diff -w "$reference" $seq.out.bad + $diff -w "$reference" $(realpath $seq.out.bad) err=true fi fi
Signature · 1 line
2.13.5
Kevin Wolf
AppliedAm 15.09.2017 um 07:45 hat Fam Zheng geschrieben:
Quoted 3 lines
So it is easier to copy paste the path.
Signed-off-by Fam Zheng <[email protected]>
I don't think I ever tried to do anything with the diff that would have required the full path, but if you say so... :-)
Thanks, applied to the block branch.
Kevin
Quoted 9 lines · Kevin Wolf
Am 15.09.2017 um 07:45 hat Fam Zheng geschrieben:
Quoted 3 lines
So it is easier to copy paste the path.
Signed-off-by Fam Zheng <[email protected]>I don't think I ever tried to do anything with the diff that would have required the full path, but if you say so... :-)
Thanks, applied to the block branch.
Thanks.
I often create a new reference output or fix an old one by
cp /x/y/z.out.bad tests/qemu-iotests/???.out
and either the /x/y/z or the path to QEMU repo is some typing if from out-of-tree build, so getting it from the output of check is handy..
Fam
Quoted 12 lines · Fam Zheng
So it is easier to copy paste the path.
Signed-off-by Fam Zheng <[email protected]>--- tests/qemu-iotests/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests/check +0
-0
tests/qemu-iotests/check do · line 356
Quoted 5 lines
tests/qemu-iotests/check +1
-1@@ -353,7 +353,7 @@ do else echo " - output mismatch (see $seq.out.bad)" mv $tmp.out $seq.out.bad - $diff -w "$reference" $seq.out.bad + $diff -w "$reference" $(realpath $seq.out.bad)
Realpath collapses symlinks, and $() costs a process. Also, your patch fails miserably if the current working directory contains spaces; you forgot to quote $(). It would be simpler, and more correct, to do:
$diff -w "$reference" "$PWD/$seq.out.bad"
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org