From: Prakash Surya Date: Wed, 11 May 2011 15:57:19 +0000 (-0700) Subject: LU-160 Reduce OST size requirement for test 155 X-Git-Tag: 2.0.62.0~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=08ac163a04f0a9c5e4348174aa835796e2190e28;hp=0533e7bcd47e31257f09ac630e75c86462747361 LU-160 Reduce OST size requirement for test 155 The OST size requirements for sanity test 155 is reduced by running with only a single-striped file on a particular OST, and only checking the RAM on that OST's OSS node. Because it is no longer trying to create a file larger than multiple OSS nodes' RAM while only striped over a single OST, these tests should run at times when they previously would not have. Signed-off-by: Prakash Surya Change-Id: I4c1829240f4cd44366ad0de24ef6caa444f98801 Reviewed-on: http://review.whamcloud.com/534 Tested-by: Hudson Reviewed-by: Yu Jian Reviewed-by: Chris Gearing Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 49c4c35..2a2b650 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -6872,21 +6872,21 @@ test_155_small_load() { test_155_big_load() { local temp=$TMP/$tfile local file=$DIR/$tfile - local list=$(comma_list $(osts_nodes)) - local big=$(do_nodes $list grep "cache" /proc/cpuinfo | \ - awk '{sum+=$4} END{print sum}') - local min_avail=$(lctl get_param -n osc.*[oO][sS][cC]-[^M]*.kbytesavail | \ - sort -n | head -1) - local large_file_size=$((big * 2)) - - log "cache size on OSS is $big KB" - log "large file size is $large_file_size KB" - log "min available OST size is $min_avail KB" - - [ $min_avail -le $large_file_size ] && \ - skip "the minimum available OST size needs > $large_file_size KB" && \ + + free_min_max + local cache_size=$(do_facet ost$((MAXI+1)) \ + "awk '/cache/ {sum+=\\\$4} END {print sum}' /proc/cpuinfo") + local large_file_size=$((cache_size * 2)) + + echo "OSS cache size: $cache_size KB" + echo "Large file size: $large_file_size KB" + + [ $MAXV -le $large_file_size ] && \ + skip_env "max available OST size needs > $large_file_size KB" && \ return 0 + $SETSTRIPE $file -c 1 -i $MAXI || error "$SETSTRIPE $file failed" + dd if=/dev/urandom of=$temp bs=$large_file_size count=1k || \ error "dd of=$temp bs=$large_file_size count=1k failed" cp $temp $file