xfstests: fix double set for SCRATCH_DEV when SCRATCH_DEV_POOL is set
PATCH 2/3 xfstests: fix double set for SCRATCH_DEV when SCRATCH_DEV_POOL is set
check script has moved the first device of SCRATCH_DEV_POOL and used it to set SCRATCH_DEV. But the case 265 does the same thing again when it includes common.rc. Fix it by setting SCRATCH_DEV just by check script.
Signed-off-by Miao Xie <[email protected]>
--- common.config | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
common.config +3 -2
@@ -232,12 +232,13 @@ fi # a btrfs tester will set only SCRATCH_DEV_POOL, we will put first of its dev # to SCRATCH_DEV and rest to SCRATCH_DEV_POOL to maintain the backward compatibility -if [ ! -z "$SCRATCH_DEV_POOL" ]; then +if [ "$iam" == "check" -a ! -z "$SCRATCH_DEV_POOL" ]; then if [ ! -z "$SCRATCH_DEV" ]; then echo "common.config: Error: \$SCRATCH_DEV should be unset when \$SCRATCH_DEV_POOL is set" exit 1 fi - SCRATCH_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'` + # the user may forget to export SCRATCH_DEV when he/she set SCRATCH_DEV_POOL. + export SCRATCH_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'` SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk '{ for (i = 2; i <= NF; i++) print $i}'` fi
Signature · 6 lines
1.7.6.5 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs