Skip to contentSkip to conversation

Fix test 298 to work for non-XFS filesystems

PATCH In review Jan Kara 4 participants 5 messages May 7, 2013 – May 14, 2013

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/2 Fix test 298 to work for non-XFS filesystems

Call to xfs_io in test 298 forgot to specify -F flag so it failed for non-XFS filesystems.

---
 tests/shared/298 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shared/298 +1 -1
index f1a3432..d5bed1c 100644
@@ -49,7 +49,7 @@ _cleanup()
 
 get_holes()
 {
-	$XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
+	$XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
 }
 
 get_free_sectors()
Signature · 6 lines
1.8.1.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
author
#1 lore raw

PATCH 2/2 Make test 306 use null and zero device nodes on SCRATCH_MNT

In one place of test 306, we mistakenly used /dev/null and /dev/zero instead of equivalent devices created on tested filesystem. So we were not really testing the functionality we intended.

---
 tests/generic/306 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/generic/306 +2 -2
index e8e0fc0..f45d142 100644
@@ -73,9 +73,9 @@ _scratch_mount -o ro || _fail "Could not mount scratch readonly"
 echo "== try to create new file"
 touch $SCRATCH_MNT/this_should_fail 2>&1 | _filter_scratch
 echo "== pwrite to null device"
-$XFS_IO_PROG -F -c "pwrite 0 512" /dev/null | _filter_xfs_io
+$XFS_IO_PROG -F -c "pwrite 0 512" $DEVNULL | _filter_xfs_io
 echo "== pread from zero device"
-$XFS_IO_PROG -F -c "pread 0 512" /dev/zero | _filter_xfs_io
+$XFS_IO_PROG -F -c "pread 0 512" $DEVZERO | _filter_xfs_io
 
 echo "== truncating write to null device"
 echo foo > $DEVNULL 2>&1 | _filter_scratch
Signature · 6 lines
1.8.1.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] Make test 306 use null and zero device nodes on SCRATCH_MNT

Quoted 5 lines · Jan Kara

In one place of test 306, we mistakenly used /dev/null and /dev/zero instead of equivalent devices created on tested filesystem. So we were not really testing the functionality we intended.

Ugh. A fine mistake on my part. Thanks for catching that, cripes!

Quoted 11 lines
---
 tests/generic/306 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/generic/306 +0 -0
index e8e0fc0..f45d142 100644
@@ -73,9 +73,9 @@ _scratch_mount -o ro || _fail "Could not mount scratch readonly"
 echo "== try to create new file"

tests/generic/306 _scratch_mount -o ro || _fail "Could not mount scratch readonly" · line 81

Quoted 10 lines
tests/generic/306 +2 -2
 touch $SCRATCH_MNT/this_should_fail 2>&1 | _filter_scratch
 echo "== pwrite to null device"
-$XFS_IO_PROG -F -c "pwrite 0 512" /dev/null | _filter_xfs_io
+$XFS_IO_PROG -F -c "pwrite 0 512" $DEVNULL | _filter_xfs_io
 echo "== pread from zero device"
-$XFS_IO_PROG -F -c "pread 0 512" /dev/zero | _filter_xfs_io
+$XFS_IO_PROG -F -c "pread 0 512" $DEVZERO | _filter_xfs_io
 
 echo "== truncating write to null device"
 echo foo > $DEVNULL 2>&1 | _filter_scratch

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw

Re: [PATCH 2/2] Make test 306 use null and zero device nodes on SCRATCH_MNT

In reply to Jan Kara

This patch has been committed:

commit 2941898570ccdb32ab5af89c0b25147231489973

Author: Jan Kara <[email protected]>
Date:   Tue May 14 07:02:50 2013 -0500

Make test 306 use null and zero device nodes on SCRATCH_MNT

Thanks
--Rich

Quoted 4 lines · Jan Kara

In one place of test 306, we mistakenly used /dev/null and /dev/zero instead of equivalent devices created on tested filesystem. So we were not really testing the functionality we intended.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw
In reply to Jan Kara
Quoted 4 lines · Jan Kara

Call to xfs_io in test 298 forgot to specify -F flag so it failed for non-XFS filesystems.

See Eric's recent patch series to fix this.

http://oss.sgi.com/pipermail/xfs/2013-May/026057.html

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs