qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: convert `pwd` and $(pwd) to $PWD
Date: Fri, 16 Nov 2018 10:53:21 -0600	[thread overview]
Message-ID: <ff59cbf9-95ef-b581-34ad-a11f73f76f77@redhat.com> (raw)
In-Reply-To: <20181024094051.4470-2-maozhongyi@cmss.chinamobile.com>

On 10/24/18 4:40 AM, Mao Zhongyi wrote:
> POSIX requires $PWD to be reliable, and we expect all
> shells used by qemu scripts to be relatively close to
> POSIX.  Thus, it is smarter to avoid forking the pwd
> executable for something that is already available in
> the environment.
> 
> So replac it with the following:

s/replac/replace/

> 
> sed -i 's/`pwd`/$PWD/g' $(git grep -l "\`pwd\`")
> sed -i 's/$(pwd)/$PWD/g' $(git grep  -l "\$(pwd)")
> 
> The remaining small parts are manually modified.

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> Cc: kwolf@redhat.com
> Cc: mreitz@redhat.com
> Cc: eblake@redhat.com
> 
> Suggested-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
>   configure                        | 2 +-
>   tests/check-block.sh             | 6 +++---
>   tests/qemu-iotests/001           | 2 +-

However, this is a LOT of churn, since patch 2 then removes many of 
these lines. I'd like to swap the two patches, and then am considering 
them going through the NBD tree.

> +++ b/tests/qemu-iotests/001
> @@ -24,7 +24,7 @@ owner=hch@lst.de
>   seq=`basename $0`
>   echo "QA output created by $seq"
>   
> -here=`pwd`
> +here=$PWD
>   status=1	# failure is the default!
>   


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

  reply	other threads:[~2018-11-16 16:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24  9:40 [Qemu-devel] [PATCH v2 0/3] Do some cleaning work in qemu-iotests Mao Zhongyi
2018-10-24  9:40 ` [Qemu-devel] [PATCH v2 1/3] qemu-iotests: convert `pwd` and $(pwd) to $PWD Mao Zhongyi
2018-11-16 16:53   ` Eric Blake [this message]
2018-11-16 20:42     ` Eric Blake
2018-11-16 20:46   ` Eric Blake
2018-10-24  9:40 ` [Qemu-devel] [PATCH v2 2/3] qemu-iotests: remove unused variable here Mao Zhongyi
2018-10-24 23:26   ` Philippe Mathieu-Daudé
2018-10-25  9:34     ` [Qemu-devel] [PATCH v2 2/3] qemu-iotests: remove unused variablehere maozy
2018-11-16 16:49     ` [Qemu-devel] [PATCH v2 2/3] qemu-iotests: remove unused variable here Eric Blake
2018-10-24  9:40 ` [Qemu-devel] [PATCH v2 3/3] qemu-iotests: Modern shell scripting (use $() instead of ``) Mao Zhongyi
2018-11-16 16:58   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff59cbf9-95ef-b581-34ad-a11f73f76f77@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=maozhongyi@cmss.chinamobile.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).