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:
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.
+++ b/tests/qemu-iotests/common.config
@@ -25,7 +25,7 @@ HOSTOS=`uname -s`
arch=`uname -m`
[[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch"
-export PWD=`pwd`
+export PWD=$PWD
This is now pointless. I'm deleting the line instead.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org