]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
nfs: recognise IPv6 export in _require_scratch_nocheck()
authorEryu Guan <eguan@redhat.com>
Wed, 1 Apr 2015 00:28:18 +0000 (11:28 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 1 Apr 2015 00:28:18 +0000 (11:28 +1100)
This commit

73dfa4a common: Fixes for testing NFS over IPv6

adds NFS over IPv6 support, and commit

76c5f3c common: re-enable tests that require scratch dev on NFS

enables NFS tests on scratch device.

Now do the same updates to _require_scratch_nocheck() to enable NFS over
IPv6 support on scratch device.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc

index 857308a80139fc16ddc0b2db04498c2a31d0d295..fbb19c2c4671a426d89f49ae25a1bf88d06d204f 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1111,10 +1111,12 @@ _require_scratch_nocheck()
     esac
 
     # mounted?
-    if _mount | grep -q $SCRATCH_DEV
+    # Note that we use -F here so grep doesn't try to interpret an NFS over
+    # IPv6 server as a regular expression.
+    if _mount | grep -F -q $SCRATCH_DEV
     then
         # if it's mounted, make sure its on $SCRATCH_MNT
-        if ! _mount | grep $SCRATCH_DEV | grep -q $SCRATCH_MNT
+        if ! _mount | grep -F $SCRATCH_DEV | grep -q $SCRATCH_MNT
         then
             echo "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
             exit 1