From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvtcr-0003J6-UF for qemu-devel@nongnu.org; Fri, 22 May 2015 16:33:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvtco-0007pf-IT for qemu-devel@nongnu.org; Fri, 22 May 2015 16:33:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvtco-0007pb-B4 for qemu-devel@nongnu.org; Fri, 22 May 2015 16:32:58 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4MKWvbq031496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 22 May 2015 16:32:57 -0400 Message-ID: <555F9278.3040200@redhat.com> Date: Fri, 22 May 2015 16:32:56 -0400 From: John Snow MIME-Version: 1.0 References: <1432325832-12887-1-git-send-email-jsnow@redhat.com> <1432325832-12887-2-git-send-email-jsnow@redhat.com> <555F9213.1050906@redhat.com> In-Reply-To: <555F9213.1050906@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] iotests: fix exclusion option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com On 05/22/2015 04:31 PM, Eric Blake wrote: > On 05/22/2015 02:17 PM, 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 grep command. >> >> Signed-off-by: John Snow --- >> 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 1e556bb..c4d0742 100644 --- >> a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ >> -82,7 +82,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 + grep -oh -E "^([0-9]{3,})" >> "${source_iotests}/group" > $tmp.list 2>/dev/null > > 'grep -oh' is a GNU-ism; is it going to cause grief on BSD > platforms? > It might... I'll look at other options. awk is probably fine here for printing column 1. --js