From patchwork Wed Mar 22 06:46:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 9638159 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 3D74E601E9 for ; Wed, 22 Mar 2017 06:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EFE22780C for ; Wed, 22 Mar 2017 06:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23B1227CAF; Wed, 22 Mar 2017 06:47:31 +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 AD55E2780C for ; Wed, 22 Mar 2017 06:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758711AbdCVGrD (ORCPT ); Wed, 22 Mar 2017 02:47:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757691AbdCVGqc (ORCPT ); Wed, 22 Mar 2017 02:46:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CDD7880F63 for ; Wed, 22 Mar 2017 06:46:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CDD7880F63 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=zlang@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CDD7880F63 Received: from dhcp-12-168.nay.redhat.com (dhcp-12-168.nay.redhat.com [10.66.12.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9FD07FE00; Wed, 22 Mar 2017 06:46:31 +0000 (UTC) From: Zorro Lang To: fstests@vger.kernel.org Cc: ndevos@redhat.com Subject: [PATCH] common/rc: support gluster volume start with a slash Date: Wed, 22 Mar 2017 14:46:28 +0800 Message-Id: <1490165188-488-1-git-send-email-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 22 Mar 2017 06:46:32 +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 The format of glusterfs' TEST_DEV or SCRATCH_DEV is XXX:XXX or XXX:/XXX, but xfstests can't accept the latter now. So change the regular expression from "\w:\w" to ":/?", to accept more glusterfs device format. Signed-off-by: Zorro Lang --- Hi, According to the feedback from glusterfs developer: "Yes, it would be good to have an optional "/" after the ":". It is not required, but would probably help when someone runs the tests with the "hostname:/volume" device format." Maybe there's a slash before the gluster volume name. This patch try to support this format. Thanks, Zorro common/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index edfba5d..e1ab2c6 100644 --- a/common/rc +++ b/common/rc @@ -1496,7 +1496,7 @@ _require_scratch_nocheck() { case "$FSTYP" in glusterfs) - echo $SCRATCH_DEV | grep -q "\w:\w" > /dev/null 2>&1 + echo $SCRATCH_DEV | egrep -q ":/?" > /dev/null 2>&1 if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then _notrun "this test requires a valid \$SCRATCH_DEV" fi @@ -1584,7 +1584,7 @@ _require_test() { case "$FSTYP" in glusterfs) - echo $TEST_DEV | grep -q "\w:\w" > /dev/null 2>&1 + echo $TEST_DEV | egrep -q ":/?" > /dev/null 2>&1 if [ -z "$TEST_DEV" -o "$?" != "0" ]; then _notrun "this test requires a valid \$TEST_DEV" fi