]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/rc: support gluster volume start with a slash
authorZorro Lang <zlang@redhat.com>
Wed, 22 Mar 2017 06:46:28 +0000 (14:46 +0800)
committerEryu Guan <eguan@redhat.com>
Wed, 22 Mar 2017 09:06:23 +0000 (17:06 +0800)
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 <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc

index edfba5d2535d4aae3454a9e57246f0c2f8a2587b..e1ab2c6779739951290ecbc5b1b693552bf8dece 100644 (file)
--- 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