From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z02Vl-0007vC-T5 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 02:50:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z02Vi-00027s-MC for qemu-devel@nongnu.org; Wed, 03 Jun 2015 02:50:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z02Vi-00027g-GY for qemu-devel@nongnu.org; Wed, 03 Jun 2015 02:50:46 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id CA017B5E6D for ; Wed, 3 Jun 2015 06:50:44 +0000 (UTC) Date: Wed, 3 Jun 2015 14:50:41 +0800 From: Fam Zheng Message-ID: <20150603065041.GE1533@ad.nay.redhat.com> References: <1433272721-24871-1-git-send-email-jsnow@redhat.com> <1433272721-24871-2-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433272721-24871-2-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 1/4] iotests: fix exclusion option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: kwolf@redhat.com, qemu-devel@nongnu.org On Tue, 06/02 15:18, John Snow wrote: > If you are running out-of-tree, the -x option to exclude > a certain iotest is broken. > > Replace porcelain usage of ls with a sturdier awk command. > > Signed-off-by: John Snow > --- Reviewed-by: Fam Zheng > tests/qemu-iotests/common | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common > index 1030aaf..84b6f16 100644 > --- a/tests/qemu-iotests/common > +++ b/tests/qemu-iotests/common > @@ -83,7 +83,8 @@ s/ .*//p > elif $xgroup > then > # arg after -x > - [ ! -s $tmp.list ] && ls [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] >$tmp.list 2>/dev/null > + # 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 /"'{ > s/ .*//p > }'` > -- > 2.1.0 >