[PATCH] common/rc: support gluster volume start with a slash

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxx>
---

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
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux