[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Print full path of bad ou
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Print full path of bad output if mismatch |
Date: |
Fri, 15 Sep 2017 13:13:26 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/15/2017 12:45 AM, Fam Zheng wrote:
> So it is easier to copy paste the path.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> tests/qemu-iotests/check | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
> index d504b6e455..4583a0c269 100755
> --- a/tests/qemu-iotests/check
> +++ b/tests/qemu-iotests/check
> @@ -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"
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature