qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] iotests: Drop readlink -f


From: Eric Blake
Subject: Re: [PATCH v3] iotests: Drop readlink -f
Date: Mon, 14 Sep 2020 11:04:42 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 9/14/20 10:43 AM, Thomas Huth wrote:

+++ b/tests/qemu-iotests/check
@@ -44,7 +44,7 @@ then
          _init_error "failed to obtain source tree name from check symlink"
      fi
      source_iotests=$(cd "$source_iotests"; pwd) || _init_error "failed to enter 
source tree"
-    build_iotests=$(readlink -f $(dirname "$0"))
+    build_iotests=$(cd "$(dirname "$0")"; pwd)

I assume the nested quotes are ok here? ... shell scripts always confuse
me in that regard...

Yes. Anything inside $() is a standalone script. That's one of the reasons that $() is nicer than `` (where you did indeed have to worry about " inside `` interfering with "``" on the outside, in some shells).

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]