Some tests are running needlessly long compared to the value that
they provide, and can be made much faster without any loss in value.
conf-sanity test_53a: run llverdev in partial mode always
conf-sanity test_53b: run llverfs in partial mode always
sanity test_220: use unlinkmany instead of "rm -rf", but could likely
be sped up dramatically via CFS_FAIL_LOC() on OST
Change-Id: Ifbe66bffc051b6163e41a9bffb1d6b1ab6304e94
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1266
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
}
run_test 53b "check MDT thread count params"
}
run_test 53b "check MDT thread count params"
-run_llverfs()
-{
- local dir=$1
- local partial_arg=""
- local size=$(df -B G $dir | tail -1 | awk '{print $2}' | sed 's/G//') # Gb
-
- # Run in partial (fast) mode if the size
- # of a partition > 10 GB
- [ $size -gt 10 ] && partial_arg="-p"
-
- llverfs $partial_arg $dir
-}
-
- do_rpc_nodes $(facet_host ost1) run_llverdev $(ostdevname 1)
+ do_rpc_nodes $(facet_host ost1) run_llverdev $(ostdevname 1) -p
[ $? -eq 0 ] || error "llverdev failed!"
reformat_and_config
}
[ $? -eq 0 ] || error "llverdev failed!"
reformat_and_config
}
+run_test 54a "test llverdev and partial verify of device"
[ $? -eq 0 ] || error "llverfs failed!"
cleanup
}
[ $? -eq 0 ] || error "llverfs failed!"
cleanup
}
+run_test 54b "test llverfs and partial verify of filesystem"
local ostdev=$(ostdevname 1)
local saved_opts=$OST_MKFS_OPTS
local ostdev=$(ostdevname 1)
local saved_opts=$OST_MKFS_OPTS
do
OST_MKFS_OPTS="$saved_opts --index $i"
reformat
do
OST_MKFS_OPTS="$saved_opts --index $i"
reformat
do_facet mgs $LCTL pool_remove $FSNAME.$TESTNAME $OST || return 4
do_facet mgs $LCTL pool_destroy $FSNAME.$TESTNAME || return 5
do_facet mgs $LCTL pool_remove $FSNAME.$TESTNAME $OST || return 4
do_facet mgs $LCTL pool_destroy $FSNAME.$TESTNAME || return 5
+ unlinkmany $DIR/$tdir/f $next_id $free || return 3
}
run_test 220 "the preallocated objects in MDS still can be used if ENOSPC is returned by OST with enough disk space"
}
run_test 220 "the preallocated objects in MDS still can be used if ENOSPC is returned by OST with enough disk space"
run_llverdev()
{
local dev=$1
run_llverdev()
{
local dev=$1
local devname=$(basename $1)
local size=$(grep "$devname"$ /proc/partitions | awk '{print $3}')
# loop devices aren't in /proc/partitions
local devname=$(basename $1)
local size=$(grep "$devname"$ /proc/partitions | awk '{print $3}')
# loop devices aren't in /proc/partitions
local partial_arg=""
# Run in partial (fast) mode if the size
local partial_arg=""
# Run in partial (fast) mode if the size
- # of a partition > 10 GB
- [ $size -gt 10 ] && partial_arg="-p"
+ # of a partition > 1 GB
+ [ $size -gt 1 ] && partial_arg="-p"
- llverdev --force $partial_arg $dev
+ llverdev --force $partial_arg $llverdev_opts $dev
+}
+
+run_llverfs()
+{
+ local dir=$1
+ local llverfs_opts=$2
+ local partial_arg=""
+ local size=$(df -B G $dir |tail -n 1 |awk '{print $2}' |sed 's/G//') #GB
+
+ # Run in partial (fast) mode if the size
+ # of a partition > 1 GB
+ [ $size -gt 1 ] && partial_arg="-p"
+
+ llverfs $partial_arg $llverfs_opts $dir