From patchwork Thu Oct 18 03:17:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Zhongyi X-Patchwork-Id: 985665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42bDmd3jv3z9sBk for ; Thu, 18 Oct 2018 14:19:29 +1100 (AEDT) Received: from localhost ([::1]:39991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCyqN-0005i1-2J for incoming@patchwork.ozlabs.org; Wed, 17 Oct 2018 23:19:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCyod-000537-O5 for qemu-devel@nongnu.org; Wed, 17 Oct 2018 23:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCyoZ-0001D8-4v for qemu-devel@nongnu.org; Wed, 17 Oct 2018 23:17:39 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:55988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCyoX-00014q-UD; Wed, 17 Oct 2018 23:17:35 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app08-12008 (RichMail) with SMTP id 2ee85bc7fb4b225-9bf03; Thu, 18 Oct 2018 11:17:31 +0800 (CST) X-RM-TRANSID: 2ee85bc7fb4b225-9bf03 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.149]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25bc7fb45a2e-7c407; Thu, 18 Oct 2018 11:17:30 +0800 (CST) X-RM-TRANSID: 2ee25bc7fb45a2e-7c407 From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2018 11:17:21 +0800 Message-Id: <20181018031723.23459-2-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181018031723.23459-1-maozhongyi@cmss.chinamobile.com> References: <20181018031723.23459-1-maozhongyi@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.80 Subject: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: Modern shellscripting (use $() instead of ``) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-block@nongnu.org, Mao Zhongyi , mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. `pwd` and `basename $0` are in 231 files under directory tests/qemu-iotests, so replaced it with the following: sed -i 's/`pwd`/$(pwd)/g' $(git grep -l "\`pwd\`") sed -i 's/`basename $0`/$(basename $0)/g' $(git grep -l "basename \$0") A small amount of the rest is manually modified. Cc: kwolf@redhat.com Cc: mreitz@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Mao Zhongyi --- tests/qemu-iotests/001 | 4 +- tests/qemu-iotests/002 | 4 +- tests/qemu-iotests/003 | 4 +- tests/qemu-iotests/004 | 4 +- tests/qemu-iotests/005 | 4 +- tests/qemu-iotests/007 | 6 +-- tests/qemu-iotests/008 | 4 +- tests/qemu-iotests/009 | 4 +- tests/qemu-iotests/010 | 4 +- tests/qemu-iotests/011 | 6 +-- tests/qemu-iotests/012 | 4 +- tests/qemu-iotests/013 | 4 +- tests/qemu-iotests/014 | 6 +-- tests/qemu-iotests/015 | 4 +- tests/qemu-iotests/017 | 4 +- tests/qemu-iotests/018 | 4 +- tests/qemu-iotests/019 | 4 +- tests/qemu-iotests/020 | 4 +- tests/qemu-iotests/021 | 4 +- tests/qemu-iotests/022 | 4 +- tests/qemu-iotests/023 | 4 +- tests/qemu-iotests/024 | 4 +- tests/qemu-iotests/025 | 4 +- tests/qemu-iotests/026 | 4 +- tests/qemu-iotests/027 | 4 +- tests/qemu-iotests/028 | 4 +- tests/qemu-iotests/029 | 4 +- tests/qemu-iotests/031 | 4 +- tests/qemu-iotests/032 | 4 +- tests/qemu-iotests/033 | 4 +- tests/qemu-iotests/034 | 4 +- tests/qemu-iotests/035 | 4 +- tests/qemu-iotests/036 | 4 +- tests/qemu-iotests/037 | 4 +- tests/qemu-iotests/038 | 4 +- tests/qemu-iotests/039 | 4 +- tests/qemu-iotests/042 | 4 +- tests/qemu-iotests/043 | 4 +- tests/qemu-iotests/046 | 4 +- tests/qemu-iotests/047 | 4 +- tests/qemu-iotests/048 | 2 +- tests/qemu-iotests/049 | 4 +- tests/qemu-iotests/050 | 4 +- tests/qemu-iotests/051 | 4 +- tests/qemu-iotests/052 | 4 +- tests/qemu-iotests/053 | 4 +- tests/qemu-iotests/054 | 4 +- tests/qemu-iotests/058 | 4 +- tests/qemu-iotests/059 | 4 +- tests/qemu-iotests/061 | 4 +- tests/qemu-iotests/062 | 4 +- tests/qemu-iotests/063 | 4 +- tests/qemu-iotests/064 | 4 +- tests/qemu-iotests/067 | 4 +- tests/qemu-iotests/070 | 4 +- tests/qemu-iotests/073 | 4 +- tests/qemu-iotests/074 | 2 +- tests/qemu-iotests/075 | 4 +- tests/qemu-iotests/076 | 4 +- tests/qemu-iotests/077 | 4 +- tests/qemu-iotests/078 | 4 +- tests/qemu-iotests/079 | 4 +- tests/qemu-iotests/080 | 4 +- tests/qemu-iotests/081 | 4 +- tests/qemu-iotests/082 | 4 +- tests/qemu-iotests/083 | 4 +- tests/qemu-iotests/084 | 4 +- tests/qemu-iotests/085 | 4 +- tests/qemu-iotests/086 | 4 +- tests/qemu-iotests/087 | 4 +- tests/qemu-iotests/088 | 4 +- tests/qemu-iotests/091 | 4 +- tests/qemu-iotests/092 | 4 +- tests/qemu-iotests/095 | 4 +- tests/qemu-iotests/101 | 4 +- tests/qemu-iotests/104 | 4 +- tests/qemu-iotests/105 | 4 +- tests/qemu-iotests/116 | 4 +- tests/qemu-iotests/128 | 4 +- tests/qemu-iotests/131 | 4 +- tests/qemu-iotests/133 | 4 +- tests/qemu-iotests/134 | 4 +- tests/qemu-iotests/135 | 4 +- tests/qemu-iotests/142 | 4 +- tests/qemu-iotests/144 | 4 +- tests/qemu-iotests/145 | 4 +- tests/qemu-iotests/146 | 4 +- tests/qemu-iotests/154 | 4 +- tests/qemu-iotests/158 | 4 +- tests/qemu-iotests/171 | 4 +- tests/qemu-iotests/172 | 4 +- tests/qemu-iotests/173 | 4 +- tests/qemu-iotests/174 | 4 +- tests/qemu-iotests/175 | 4 +- tests/qemu-iotests/177 | 4 +- tests/qemu-iotests/178 | 4 +- tests/qemu-iotests/181 | 4 +- tests/qemu-iotests/183 | 4 +- tests/qemu-iotests/184 | 4 +- tests/qemu-iotests/185 | 4 +- tests/qemu-iotests/186 | 4 +- tests/qemu-iotests/187 | 4 +- tests/qemu-iotests/188 | 4 +- tests/qemu-iotests/189 | 4 +- tests/qemu-iotests/190 | 4 +- tests/qemu-iotests/191 | 4 +- tests/qemu-iotests/192 | 4 +- tests/qemu-iotests/195 | 4 +- tests/qemu-iotests/198 | 4 +- tests/qemu-iotests/200 | 4 +- tests/qemu-iotests/201 | 2 +- tests/qemu-iotests/204 | 4 +- tests/qemu-iotests/226 | 4 +- tests/qemu-iotests/231 | 4 +- tests/qemu-iotests/check | 62 +++++++++++++++---------------- tests/qemu-iotests/common.config | 6 +-- tests/qemu-iotests/common.pattern | 4 +- tests/qemu-iotests/common.rc | 2 +- 118 files changed, 265 insertions(+), 265 deletions(-) diff --git a/tests/qemu-iotests/001 b/tests/qemu-iotests/001 index ffd14e2ce9..3fcea0e6d2 100755 --- a/tests/qemu-iotests/001 +++ b/tests/qemu-iotests/001 @@ -21,10 +21,10 @@ # creator owner=hch@lst.de -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/002 b/tests/qemu-iotests/002 index d4f8e91b91..42976b8ad5 100755 --- a/tests/qemu-iotests/002 +++ b/tests/qemu-iotests/002 @@ -21,10 +21,10 @@ # creator owner=hch@lst.de -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/003 b/tests/qemu-iotests/003 index 19889b9fcd..104c3a286a 100755 --- a/tests/qemu-iotests/003 +++ b/tests/qemu-iotests/003 @@ -21,10 +21,10 @@ # creator owner=hch@lst.de -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/004 b/tests/qemu-iotests/004 index 6f2aa3d9a2..2c8942d4fc 100755 --- a/tests/qemu-iotests/004 +++ b/tests/qemu-iotests/004 @@ -21,10 +21,10 @@ # creator owner=hch@lst.de -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/005 b/tests/qemu-iotests/005 index 444737751f..2d26736e03 100755 --- a/tests/qemu-iotests/005 +++ b/tests/qemu-iotests/005 @@ -24,10 +24,10 @@ # creator owner=hch@lst.de -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/007 b/tests/qemu-iotests/007 index fa543eeb7d..94343eba41 100755 --- a/tests/qemu-iotests/007 +++ b/tests/qemu-iotests/007 @@ -21,10 +21,10 @@ # creator owner=kwolf@redhat.com -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() @@ -50,7 +50,7 @@ echo echo "creating image" _make_test_img 1M -for i in `seq 1 10`; do +for i in $(seq 1 10); do echo "savevm $i" $QEMU -nographic -hda "$TEST_IMG" -serial none -monitor stdio >/dev/null 2>&1 <. -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" status=1 # failure is the default! diff --git a/tests/qemu-iotests/204 b/tests/qemu-iotests/204 index feb69d2ada..14be73bb76 100755 --- a/tests/qemu-iotests/204 +++ b/tests/qemu-iotests/204 @@ -21,10 +21,10 @@ # creator owner=eblake@redhat.com -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/226 b/tests/qemu-iotests/226 index 8ec3e612dd..2a26ad0e38 100755 --- a/tests/qemu-iotests/226 +++ b/tests/qemu-iotests/226 @@ -22,10 +22,10 @@ # creator owner=jsnow@redhat.com -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/231 b/tests/qemu-iotests/231 index 3e283708b4..7edc0cfee6 100755 --- a/tests/qemu-iotests/231 +++ b/tests/qemu-iotests/231 @@ -23,10 +23,10 @@ # creator owner=jcody@redhat.com -seq=`basename $0` +seq=$(basename $0) echo "QA output created by $seq" -here=`pwd` +here=$(pwd) status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index aa94c6c7ea..8d9eff972a 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -80,17 +80,17 @@ _full_imgfmt_details() _full_platform_details() { - os=`uname -s` - host=`hostname -s` - kernel=`uname -r` - platform=`uname -m` + os=$(uname -s) + host=$(hostname -s) + kernel=$(uname -r) + platform=$(uname -m) echo "$os/$platform $host $kernel" } # $1 = prog to look for set_prog_path() { - p=`command -v $1 2> /dev/null` + p=$(command -v $1 2> /dev/null) if [ -n "$p" -a -x "$p" ]; then type -p "$p" else @@ -99,7 +99,7 @@ set_prog_path() } if [ -z "$TEST_DIR" ]; then - TEST_DIR=`pwd`/scratch + TEST_DIR=$(pwd)/scratch fi if [ ! -e "$TEST_DIR" ]; then @@ -147,9 +147,9 @@ do if $group then # arg after -g - group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ + group_list=$(sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ s/ .*//p -}'` +}') if [ -z "$group_list" ] then echo "Group \"$r\" is empty or not defined?" @@ -173,9 +173,9 @@ s/ .*//p # arg after -x # Populate $tmp.list with all tests awk '/^[0-9]{3,}/ {print $1}' "${source_iotests}/group" > $tmp.list 2>/dev/null - group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ + group_list=$(sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ s/ .*//p -}'` +}') if [ -z "$group_list" ] then echo "Group \"$r\" is empty or not defined?" @@ -193,7 +193,7 @@ s/ .*//p rm -f $tmp.sed fi echo "/^$t\$/d" >>$tmp.sed - numsed=`expr $numsed + 1` + numsed=$(expr $numsed + 1) done sed -f $tmp.sed <$tmp.list >$tmp.tmp mv $tmp.tmp $tmp.list @@ -433,12 +433,12 @@ testlist options ;; [0-9]*-[0-9]*) - eval `echo $r | sed -e 's/^/start=/' -e 's/-/ end=/'` + eval $(echo $r | sed -e 's/^/start=/' -e 's/-/ end=/') ;; [0-9]*-) - eval `echo $r | sed -e 's/^/start=/' -e 's/-//'` - end=`echo [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] | sed -e 's/\[0-9]//g' -e 's/ *$//' -e 's/.* //'` + eval $(echo $r | sed -e 's/^/start=/' -e 's/-//') + end=$(echo [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] | sed -e 's/\[0-9]//g' -e 's/ *$//' -e 's/.* //') if [ -z "$end" ] then echo "No tests in range \"$r\"?" @@ -455,8 +455,8 @@ testlist options esac # get rid of leading 0s as can be interpreted as octal - start=`echo $start | sed 's/^0*//'` - end=`echo $end | sed 's/^0*//'` + start=$(echo $start | sed 's/^0*//') + end=$(echo $end | sed 's/^0*//') if $xpand then @@ -531,7 +531,7 @@ fi # should be sort -n, but this did not work for Linux when this # was ported from IRIX # -list=`sort $tmp.list` +list=$(sort $tmp.list) rm -f $tmp.list $tmp.tmp $tmp.sed if [ -z "$QEMU_PROG" ] @@ -590,7 +590,7 @@ fi export QEMU_NBD_PROG="$(type -p "$QEMU_NBD_PROG")" if [ -z "$QEMU_VXHS_PROG" ]; then - export QEMU_VXHS_PROG="`set_prog_path qnio_server`" + export QEMU_VXHS_PROG="$(set_prog_path qnio_server)" fi if [ -x "$build_iotests/socket_scm_helper" ] @@ -616,7 +616,7 @@ _wallclock() _timestamp() { - now=`date "+%T"` + now=$(date "+%T") printf %s " [$now]" } @@ -642,9 +642,9 @@ END { if (NR > 0) { if [ -f $tmp.expunged ] then - notrun=`wc -l <$tmp.expunged | sed -e 's/ *//g'` - try=`expr $try - $notrun` - list=`echo "$list" | sed -f $tmp.expunged` + notrun=$(wc -l <$tmp.expunged | sed -e 's/ *//g') + try=$(expr $try - $notrun) + list=$(echo "$list" | sed -f $tmp.expunged) fi echo "" >>check.log @@ -682,8 +682,8 @@ trap "_wrapup; exit \$status" 0 1 2 3 15 [ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE -FULL_IMGFMT_DETAILS=`_full_imgfmt_details` -FULL_HOST_DETAILS=`_full_platform_details` +FULL_IMGFMT_DETAILS=$(_full_imgfmt_details) +FULL_HOST_DETAILS=$(_full_platform_details) cat <>$tmp.time + echo "$seq $(expr $stop - $start)" >>$tmp.time fi else echo " - output mismatch (see $seq.out.bad)" @@ -824,14 +824,14 @@ do if $err then bad="$bad $seq" - n_bad=`expr $n_bad + 1` + n_bad=$(expr $n_bad + 1) quick=false fi - [ -f $seq.notrun ] || try=`expr $try + 1` + [ -f $seq.notrun ] || try=$(expr $try + 1) seq="after_$seq" done interrupt=false -status=`expr $n_bad` +status=$(expr $n_bad) exit diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config index 102aa6878a..b4e08bd8ca 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -21,11 +21,11 @@ export LANG=C PATH=".:$PATH" -HOSTOS=`uname -s` -arch=`uname -m` +HOSTOS=$(uname -s) +arch=$(uname -m) [[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch" -export PWD=`pwd` +export PWD=$(pwd) # make sure we have a standard umask umask 022 diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern index 34f4a8dc9b..e30fe6a069 100644 --- a/tests/qemu-iotests/common.pattern +++ b/tests/qemu-iotests/common.pattern @@ -22,7 +22,7 @@ function do_is_allocated() { local step=$3 local count=$4 - for i in `seq 1 $count`; do + for i in $(seq 1 $count); do echo alloc $(( start + (i - 1) * step )) $size done } @@ -40,7 +40,7 @@ function do_io() { local pattern=$6 echo === IO: pattern $pattern >&2 - for i in `seq 1 $count`; do + for i in $(seq 1 $count); do echo $op -P $pattern $(( start + (i - 1) * step )) $size done } diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 44bee16a5e..41d91be54a 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -160,7 +160,7 @@ fi ORIG_TEST_IMG="$TEST_IMG" if [ -z "$TEST_DIR" ]; then - TEST_DIR=`pwd`/scratch + TEST_DIR=$(pwd)/scratch fi QEMU_TEST_DIR="${TEST_DIR}" From patchwork Thu Oct 18 03:17:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Zhongyi X-Patchwork-Id: 985663 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42bDlR1QBjz9sBk for ; Thu, 18 Oct 2018 14:18:25 +1100 (AEDT) Received: from localhost ([::1]:39989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCypJ-00053O-3P for incoming@patchwork.ozlabs.org; Wed, 17 Oct 2018 23:18:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCyod-000535-NX for qemu-devel@nongnu.org; Wed, 17 Oct 2018 23:17:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCyoY-0001BL-GC for qemu-devel@nongnu.org; Wed, 17 Oct 2018 23:17:39 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:29717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCyoX-00015s-R1 for qemu-devel@nongnu.org; Wed, 17 Oct 2018 23:17:34 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee15bc7fb4b995-9c5d2; Thu, 18 Oct 2018 11:17:31 +0800 (CST) X-RM-TRANSID: 2ee15bc7fb4b995-9c5d2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.149]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25bc7fb45a2e-7c40e; Thu, 18 Oct 2018 11:17:31 +0800 (CST) X-RM-TRANSID: 2ee25bc7fb45a2e-7c40e From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2018 11:17:22 +0800 Message-Id: <20181018031723.23459-3-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181018031723.23459-1-maozhongyi@cmss.chinamobile.com> References: <20181018031723.23459-1-maozhongyi@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.79 Subject: [Qemu-devel] [PATCH v2 2/3] debian-bootstrap.pre: Modern shell scripting (use $() instead of ``) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: famz@redhat.com, alex.bennee@linaro.org, Mao Zhongyi , philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: alex.bennee@linaro.org Cc: famz@redhat.com Cc: philmd@redhat.com Signed-off-by: Mao Zhongyi --- tests/docker/dockerfiles/debian-bootstrap.pre | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index 3b0ef95374..c164778c30 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -2,7 +2,7 @@ # # Simple wrapper for debootstrap, run in the docker build context # -FAKEROOT=`which fakeroot 2> /dev/null` +FAKEROOT=$(which fakeroot 2> /dev/null) # debootstrap < 1.0.67 generates empty sources.list, see Debian#732255 MIN_DEBOOTSTRAP_VERSION=1.0.67 @@ -52,7 +52,7 @@ fi if [ -z $DEBOOTSTRAP_DIR ]; then NEED_DEBOOTSTRAP=false - DEBOOTSTRAP=`which debootstrap 2> /dev/null` + DEBOOTSTRAP=$(which debootstrap 2> /dev/null) if [ -z $DEBOOTSTRAP ]; then echo "No debootstrap installed, attempting to install from SCM" NEED_DEBOOTSTRAP=true