xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script
PATCH 1/1 xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script
--- common.config | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-)
common.config +14 -12
@@ -201,9 +201,9 @@ known_hosts() # Mandatory Config values. MC="" - [ -z "$EMAIL" ] && MC="$MC EMAIL" - [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR" - [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV" + [ -z "$EMAIL" ] && MC="$MC EMAIL" + [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR" + [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV" if [ -n "$MC" ]; then echo "Warning: need to define parameters for host $HOST"
@@ -219,15 +219,17 @@ else known_hosts fi -echo $TEST_DEV | grep -q ":" > /dev/null 2>&1 -if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then - echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem" - exit 1 -fi - -if [ ! -d "$TEST_DIR" ]; then - echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory" - exit 1 +if [ "$iam" != "new" ]; then + echo $TEST_DEV | grep -q ":" > /dev/null 2>&1 + if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then + echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem" + exit 1 + fi + + if [ ! -d "$TEST_DIR" ]; then + echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory" + exit 1 + fi fi # a btrfs tester will set only SCRATCH_DEV_POOL, we will put first of its dev
--
1.7.7.6
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 11 lines · Tomas Racek
Signed-off-by Tomas Racek <[email protected]>--- common.config | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-)common.config +0
-0
common.config known_hosts() · line 206
Quoted 9 lines
common.config +3
-3@@ -201,9 +201,9 @@ known_hosts() # Mandatory Config values. MC="" - [ -z "$EMAIL" ] && MC="$MC EMAIL" - [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR" - [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV" + [ -z "$EMAIL" ] && MC="$MC EMAIL" + [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR" + [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV"
Given that I'm currently in the process of killing $iam as I rework the structure of xfstests, I really don't like the idea of introducing new dependencies on it.
Also, I prefer to know that someone writing a new test is developing it in a configured, working test environment. After all, you have to test your new test as you write it... :p
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 10 lines
common.config known_hosts() · line 206
Quoted 9 lines
# Mandatory Config values.
MC=""common.config +3
-3- [ -z "$EMAIL" ] && MC="$MC EMAIL" - [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR" - [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV" + [ -z "$EMAIL" ] && MC="$MC EMAIL" + [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR" + [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV"
Quoted 3 lines
Given that I'm currently in the process of killing $iam as I rework the structure of xfstests, I really don't like the idea of introducing new dependencies on it.
OK, I didn't know that. ;-)
Quoted 3 lines
Also, I prefer to know that someone writing a new test is developing it in a configured, working test environment. After all, you have to test your new test as you write it... :p
I thought that is not necessary to depend on those if new script doesn't require them but I can see your point.
Thanks for comments!
Tomas
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs