Skip _check_test_fs unless a test is actually run
PATCH 1/3 Skip _check_test_fs unless a test is actually run
Running _check_test_fs can take a non-trivial amount of time, and if a test has been skipped because it doesn't work on Linux, or it doesn't work of for ext4, it's pointless to re-run _check_test_fs. So move the call to _check_test_fs so it is only run if a test is actually run.
--- check | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
check +1 -1
@@ -308,10 +308,10 @@ do then try="$try $seq" n_try=`expr $n_try + 1` + _check_test_fs fi seq="after_$seq" - _check_test_fs done interrupt=false
Signature · 6 lines
1.6.3.2.1.gb9f7d.dirty _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 2/3 Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional
Commit 3ae9f2f8 purports to allow SCRATCH_DEV and SCRATCH_MNT to be optional, but tests in common.config will cause check to exit with an error if these environment variables are not defined. Fix this problem.
--- common.config | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
common.config +4 -4
@@ -23,10 +23,10 @@ # mounted XFS file system, needs to be be world # writeable # TEST_DEV - device for file system containing TEST_DIR -# SCRATCH_DEV - device you can make a scratch file system on -# SCRATCH_MNT - mount point for scratch file system # # and optionally: +# SCRATCH_DEV - device you can make a scratch file system on +# SCRATCH_MNT - mount point for scratch file system # SCRATCH_LOGDEV - scratch log device for external log testing # SCRATCH_RTDEV - scratch rt dev # TEST_LOGDEV - test log device for external log testing
@@ -202,8 +202,8 @@ known_hosts() [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR" [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV" - [ -z "$SCRATCH_MNT" ] && MC="$MC SCRATCH_MNT" - [ -z "$SCRATCH_DEV" ] && MC="$MC SCRATCH_DEV" +# [ -z "$SCRATCH_MNT" ] && MC="$MC SCRATCH_MNT" +# [ -z "$SCRATCH_DEV" ] && MC="$MC SCRATCH_DEV" [ "$MC" ] && (echo "Warning: need to define parameters for host $HOST";\ echo " or set variables:"; \
Signature · 6 lines
1.6.3.2.1.gb9f7d.dirty _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional
Quoted 5 lines · Theodore Ts'o
Commit
3ae9f2f8purports to allowSCRATCH_DEVandSCRATCH_MNTto be optional, but tests in common.config will cause check to exit with an error if these environment variables are not defined. Fix this problem.Signed-off-by "Theodore Ts'o" <[email protected]>
Thanks, I've put this in.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 3/3 Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
In reply to Theodore Ts'oThe extN, reiserfs, gfs2, and btrfs filesysytem types should use the same check for a block device as XFS and UDF, and not the test for NFS, which was checking for host:/foo/bar/baz when checking for a scratch device.
Also, the NFS logic was also incorrect, in that it would allow a zero-length SCRATCH_DEV to continue.
--- common.rc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
common.rc +2 -2
@@ -593,7 +593,7 @@ _supported_os() _require_scratch() { case "$FSTYP" in - xfs|udf) + xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs) if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ] then _notrun "this test requires a valid \$SCRATCH_DEV"
@@ -603,7 +603,7 @@ _require_scratch() _notrun "this test requires a valid \$SCRATCH_DEV" fi ;; - nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs) + nfs*) echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ] then
Signature · 6 lines
1.6.3.2.1.gb9f7d.dirty _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
Quoted 7 lines · Theodore Ts'o
The extN, reiserfs, gfs2, and btrfs filesysytem types should use the same check for a block device as XFS and UDF, and not the test for NFS, which was checking for host:/foo/bar/baz when checking for a scratch device.
Also, the NFS logic was also incorrect, in that it would allow a zero-length
SCRATCH_DEVto continue.
This part wasn't addressed in the patch, right?
Quoted 1 line
Signed-off-by "Theodore Ts'o" <[email protected]>
Quoted 34 lines
---
common.rc | 4 ++--1 files changed, 2 insertions(+), 2 deletions(-)common.rc +2
-2@@ -593,7 +593,7 @@ _supported_os() _require_scratch() { case "$FSTYP" in - xfs|udf) + xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs) if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ] then _notrun "this test requires a valid \$SCRATCH_DEV"@@ -603,7 +603,7 @@ _require_scratch() _notrun "this test requires a valid \$SCRATCH_DEV" fi ;; - nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs) + nfs*) echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ] thenSignature · 6 lines
1.6.3.2.1.gb9f7d.dirty _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 1/1 Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
The extN, reiserfs, gfs2, and btrfs filesysytem types should use the same check for a block device as XFS and UDF, and not the test for NFS, which was checking for host:/foo/bar/baz when checking for a scratch device.
Also, the NFS logic was also incorrect, in that it would allow a zero-length SCRATCH_DEV to continue.
---
Oops, I sent the wrong version of the patch earlier. Sorry about that!!
- Ted
common.rc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
common.rc +3 -3
@@ -593,7 +593,7 @@ _supported_os() _require_scratch() { case "$FSTYP" in - xfs|udf) + xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs) if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ] then _notrun "this test requires a valid \$SCRATCH_DEV"
@@ -603,9 +603,9 @@ _require_scratch() _notrun "this test requires a valid \$SCRATCH_DEV" fi ;; - nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs) + nfs*) echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 - if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ] + if [ -z "$SCRATCH_DEV" -o "$?" != "0" ] then _notrun "this test requires a valid \$SCRATCH_DEV" fi
Signature · 6 lines
1.6.3.2.1.gb9f7d.dirty _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
Quoted 7 lines · Theodore Ts'o
The extN, reiserfs, gfs2, and btrfs filesysytem types should use the same check for a block device as XFS and UDF, and not the test for NFS, which was checking for host:/foo/bar/baz when checking for a scratch device.
Also, the NFS logic was also incorrect, in that it would allow a zero-length
SCRATCH_DEVto continue.
Thanks, I've applied this with a small modification to make the local disk case the default in the case statement so that we don't have to touch this function when adding support for additional local filesystems.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Theodore Ts'o
Running
_check_test_fscan take a non-trivial amount of time, and if a test has been skipped because it doesn't work on Linux, or it doesn't work of for ext4, it's pointless to re-run_check_test_fs. So move the call to_check_test_fsso it is only run if a test is actually run.
Definitely makes sense.
Quoted 1 line
Signed-off-by "Theodore Ts'o" <[email protected]>
Quoted 20 lines
---
check | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)check +1
-1@@ -308,10 +308,10 @@ do then try="$try $seq" n_try=`expr $n_try + 1` + _check_test_fs fi seq="after_$seq" - _check_test_fsdone
Quoted 8 lines
interrupt=false
Signature · 6 lines
1.6.3.2.1.gb9f7d.dirty _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Theodore Ts'o
Running
_check_test_fscan take a non-trivial amount of time, and if a test has been skipped because it doesn't work on Linux, or it doesn't work of for ext4, it's pointless to re-run_check_test_fs. So move the call to_check_test_fsso it is only run if a test is actually run.
Thanks, I've put this in.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs