From patchwork Mon Jul 11 09:26:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Tulak X-Patchwork-Id: 9223093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C206604DB for ; Mon, 11 Jul 2016 09:26:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B5E826E8A for ; Mon, 11 Jul 2016 09:26:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FF5D2793D; Mon, 11 Jul 2016 09:26:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D591626E8A for ; Mon, 11 Jul 2016 09:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758159AbcGKJ0V (ORCPT ); Mon, 11 Jul 2016 05:26:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50728 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752968AbcGKJ0V (ORCPT ); Mon, 11 Jul 2016 05:26:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A5C87108F; Mon, 11 Jul 2016 09:26:21 +0000 (UTC) Received: from jtulak.brq.redhat.com (jtulak.brq.redhat.com [10.34.26.85]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6B9QDO3019815; Mon, 11 Jul 2016 05:26:19 -0400 From: Jan Tulak To: fstests@vger.kernel.org Cc: david@fromorbit.com, eguan@redhat.com, Jan Tulak Subject: [PATCH 4/4] xfstests: filename handling - fix early wildcard expansion Date: Mon, 11 Jul 2016 11:26:09 +0200 Message-Id: <1468229169-24045-5-git-send-email-jtulak@redhat.com> In-Reply-To: <1468229169-24045-1-git-send-email-jtulak@redhat.com> References: <1468229169-24045-1-git-send-email-jtulak@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 11 Jul 2016 09:26:21 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add quotation marks around the wildcarded name. Signed-off-by: Jan Tulak --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index 58d8869..5ff897b 100755 --- a/check +++ b/check @@ -548,7 +548,7 @@ for section in $HOST_OPTIONS_SECTIONS; do # and the test has a name. A bit of hassle to find really # the test and not its sample output or helping files. bname=$(basename $seq) - full_seq=$(find $(dirname $seq) -name $bname* -executable | + full_seq=$(find $(dirname $seq) -name "$bname*" -executable | awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\ END { print shortest }') if [ -f $full_seq ] \