Skip to contentSkip to conversation

common/rc: support gluster volume start with a slash

PATCH In review Zorro Lang 2 participants 6 messages Mar 22, 2017

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

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

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.

---

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(-)
common/rc +2 -2
index edfba5d..e1ab2c6 100644
@@ -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
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=D7XbZsd7yutRqHmazZjNyotbWbu08eG5Bu4u1itNChY&s=EFZ_MaaT-v1fUHYAotFCcTePwiySnu-lmwBWhryF2DQ&e= 
#1 lore raw
Quoted 2 lines · Zorro Lang

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

Why can't xfstest accept the latter?

Quoted 6 lines

the regular expression from "\w:\w" to ":/?", to accept more glusterfs device format.

---

Quoted 8 lines

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."

The developer also said
"We mostly use the format of 192.168.1.1:/testvol, matching the way NFS" If we can enforce the more common format which xfstest already expects for nfs*|ceph)
Why would we want to support another optional format and have a special test case for it?

Quoted 34 lines

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(-)
common/rc +2 -3
index edfba5d..e1ab2c6 100644
@@ -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

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=sOFnPHY2QhAN81NfL6asak_zXdrfW6RhlugKVBncYLI&s=yJiytpG_eCqCMJGVP0irt3MfTtk6ueexsRUQRH2Gb9c&e=

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=sOFnPHY2QhAN81NfL6asak_zXdrfW6RhlugKVBncYLI&s=yJiytpG_eCqCMJGVP0irt3MfTtk6ueexsRUQRH2Gb9c&e=

author
#2 lore raw
Quoted 5 lines · Amir Goldstein
Quoted 2 lines · Zorro Lang

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

Why can't xfstest accept the latter?

Because I use "\w:\w" in commit "4cbc0a0 fstests: add GlusterFS support". More details please see below.

Quoted 16 lines
Quoted 7 lines

the regular expression from "\w:\w" to ":/?", to accept more glusterfs device format.

---

Quoted 8 lines

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."

Quoted 6 lines

The developer also said
"We mostly use the format of 192.168.1.1:/testvol, matching the way NFS" If we can enforce the more common format which xfstest already expects for nfs*|ceph)
Why would we want to support another optional format and have a special test case for it?

Niels is the developer of glusterfs' NFS module (sorry, I forgot its project name), he test it likes test NFS:
mount -t nfs 192.168.1.1:/XXXX /mnt

So he only can use XXXX:/XXX format, because xfstests limit that format to mount NFS.

Quoted 10 lines
Quoted 10 lines

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(-)
Quoted 10 lines

common/rc _require_scratch_nocheck() · line 1499

Quoted 10 lines
common/rc +1 -1
index edfba5d..e1ab2c6 100644
@@ -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

As I know, mount a glusrerfs always do like this:
mount -t glusterfs 192.169.1.1:testvol /mnt
or
mount -t glusterfs 192.169.1.1:/testvol /mnt

So glusterfs can use XXXX:XXX or XXXX:/XXX format, but if mount a nfs, we only can use XXXX:/XXX format.

So that's why NFS use grep -q ":/", but glusterfs use egrep -q ":/?"

Thanks,
Zorro

Quoted 15 lines
Quoted 15 lines
common/rc +1 -2
                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

Quoted 4 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=Znh-b89K7j6wvs3l5RbEROVkT_xxgQa9NsyNtBUbSGo&s=L9bNZBeVzBJNlkogpFjkUi5gG4kKsp-7Pmi9bMFXKPk&e=

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=Znh-b89K7j6wvs3l5RbEROVkT_xxgQa9NsyNtBUbSGo&s=L9bNZBeVzBJNlkogpFjkUi5gG4kKsp-7Pmi9bMFXKPk&e=

#3 lore raw
Quoted 66 lines · Zorro Lang
Quoted 5 lines · Amir Goldstein
Quoted 2 lines · Zorro Lang

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

Why can't xfstest accept the latter?

Because I use "\w:\w" in commit "4cbc0a0 fstests: add GlusterFS support". More details please see below.

Quoted 16 lines
Quoted 7 lines

the regular expression from "\w:\w" to ":/?", to accept more glusterfs device format.

---

Quoted 8 lines

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."

Quoted 6 lines

The developer also said
"We mostly use the format of 192.168.1.1:/testvol, matching the way NFS" If we can enforce the more common format which xfstest already expects for nfs*|ceph)
Why would we want to support another optional format and have a special test case for it?

Niels is the developer of glusterfs' NFS module (sorry, I forgot its project name), he test it likes test NFS:
mount -t nfs 192.168.1.1:/XXXX /mnt

So he only can use XXXX:/XXX format, because xfstests limit that format to mount NFS.

Quoted 10 lines
Quoted 10 lines

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(-)
Quoted 10 lines

common/rc _require_scratch_nocheck() · line 1499

Quoted 10 lines
common/rc +1 -1
index edfba5d..e1ab2c6 100644
@@ -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

As I know, mount a glusrerfs always do like this:
mount -t glusterfs 192.169.1.1:testvol /mnt
or
mount -t glusterfs 192.169.1.1:/testvol /mnt

Quoted 5 lines

So glusterfs can use XXXX:XXX or XXXX:/XXX format, but if mount a nfs, we only can use XXXX:/XXX format.

So that's why NFS use grep -q ":/", but glusterfs use egrep -q ":/?"

I understand.
What I am saying is that if glusterfs *can* use XXXX:/XXX and a file system tester will dedicate a specific mount for xfstests, so tester can use the NFS format for that mount and we can require that.

Is that really a big deal for the tester?

If we do that we will have less special cases for format of *_DEV
and I think that is a gain.
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=sqWPpcSQ0qX15lZGhPwlQr1tfc1EWw5ExsYYn9WJjT8&s=PbvRDVuhCNwpDUHTRaNZ6mz0lwZDQwL6svf0SzGvu7A&e=

author
#4 lore raw
Quoted 78 lines · Amir Goldstein
Quoted 66 lines · Zorro Lang
Quoted 5 lines · Amir Goldstein
Quoted 2 lines · Zorro Lang

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

Why can't xfstest accept the latter?

Because I use "\w:\w" in commit "4cbc0a0 fstests: add GlusterFS support". More details please see below.

Quoted 16 lines
Quoted 7 lines

the regular expression from "\w:\w" to ":/?", to accept more glusterfs device format.

---

Quoted 8 lines

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."

Quoted 6 lines

The developer also said
"We mostly use the format of 192.168.1.1:/testvol, matching the way NFS" If we can enforce the more common format which xfstest already expects for nfs*|ceph)
Why would we want to support another optional format and have a special test case for it?

Niels is the developer of glusterfs' NFS module (sorry, I forgot its project name), he test it likes test NFS:
mount -t nfs 192.168.1.1:/XXXX /mnt

So he only can use XXXX:/XXX format, because xfstests limit that format to mount NFS.

Quoted 10 lines
Quoted 10 lines

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(-)
Quoted 10 lines

common/rc _require_scratch_nocheck() · line 1499

Quoted 10 lines
common/rc +1 -1
index edfba5d..e1ab2c6 100644
@@ -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

As I know, mount a glusrerfs always do like this:
mount -t glusterfs 192.169.1.1:testvol /mnt
or
mount -t glusterfs 192.169.1.1:/testvol /mnt

Quoted 5 lines

So glusterfs can use XXXX:XXX or XXXX:/XXX format, but if mount a nfs, we only can use XXXX:/XXX format.

So that's why NFS use grep -q ":/", but glusterfs use egrep -q ":/?"

I understand.
What I am saying is that if glusterfs *can* use XXXX:/XXX and a file system tester will dedicate a specific mount for xfstests, so tester can use the NFS format for that mount and we can require that.

Quoted 4 lines

Is that really a big deal for the tester?

If we do that we will have less special cases for format of *_DEV and I think that is a gain.

Hah, I already added many things for glusterfs in commit "4cbc0a0
fstests: add GlusterFS support", so I think it doesn't matter to accept both formats for glusterfs too :)

Thanks,
Zorro
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=YVJw2SRNdAQTqAGU5SZFTVtiQMeXfqZ8q3xpxLs6-7U&s=S3ujP2P525-26chGTyihOdc6o5f6R88-C2FXQvcNqts&e=

#5 lore raw
Quoted 79 lines · Zorro Lang
Quoted 78 lines · Amir Goldstein
Quoted 66 lines · Zorro Lang
Quoted 5 lines · Amir Goldstein
Quoted 2 lines · Zorro Lang

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

Why can't xfstest accept the latter?

Because I use "\w:\w" in commit "4cbc0a0 fstests: add GlusterFS support". More details please see below.

Quoted 16 lines
Quoted 7 lines

the regular expression from "\w:\w" to ":/?", to accept more glusterfs device format.

---

Quoted 8 lines

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."

Quoted 6 lines

The developer also said
"We mostly use the format of 192.168.1.1:/testvol, matching the way NFS" If we can enforce the more common format which xfstest already expects for nfs*|ceph)
Why would we want to support another optional format and have a special test case for it?

Niels is the developer of glusterfs' NFS module (sorry, I forgot its project name), he test it likes test NFS:
mount -t nfs 192.168.1.1:/XXXX /mnt

So he only can use XXXX:/XXX format, because xfstests limit that format to mount NFS.

Quoted 10 lines
Quoted 10 lines

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(-)
Quoted 10 lines

common/rc _require_scratch_nocheck() · line 1499

Quoted 10 lines
common/rc +1 -1
index edfba5d..e1ab2c6 100644
@@ -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

As I know, mount a glusrerfs always do like this:
mount -t glusterfs 192.169.1.1:testvol /mnt
or
mount -t glusterfs 192.169.1.1:/testvol /mnt

Quoted 5 lines

So glusterfs can use XXXX:XXX or XXXX:/XXX format, but if mount a nfs, we only can use XXXX:/XXX format.

So that's why NFS use grep -q ":/", but glusterfs use egrep -q ":/?"

I understand.
What I am saying is that if glusterfs *can* use XXXX:/XXX and a file system tester will dedicate a specific mount for xfstests, so tester can use the NFS format for that mount and we can require that.

Quoted 9 lines
Quoted 4 lines

Is that really a big deal for the tester?

If we do that we will have less special cases for format of *_DEV and I think that is a gain.

Hah, I already added many things for glusterfs in commit "4cbc0a0
fstests: add GlusterFS support", so I think it doesn't matter to accept both formats for glusterfs too :)

Sure. fine by me. Was just a suggestion.
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=GpLaM9av9jmdm2Pi3lsAbo3t_BDAfbpiyDCmLnDtO6k&s=npY6p-k3c-WG1oS_m6uTK8JzNjcOiaXoy2X1Uo-ZJ_k&e=