From: Dmitry Eremin Date: Wed, 2 Nov 2016 14:32:39 +0000 (+0300) Subject: LU-8790 test: Limit lock number by available inodes count X-Git-Tag: 2.9.51~37 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b4a26e92d74265f134d71ba8c22362e266d366f4 LU-8790 test: Limit lock number by available inodes count For machines with big numbers of CPUs the count of files to create is more than available inodes. So, the sanity::test_124b fails. Test-Parameters: trivial Change-Id: I544efbc0da7acc99f4f60010cb404d234b1db964 Signed-off-by: Dmitry Eremin Reviewed-on: https://review.whamcloud.com/23543 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index c24dd3f..b423039 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8746,11 +8746,18 @@ test_124b() { NR=$(($(default_lru_size)*20)) if [[ $NR -gt $LIMIT ]]; then - log "Limit lock number by $LIMIT locks" - NR=$LIMIT - fi - lru_resize_disable mdc - test_mkdir -p $DIR/$tdir/disable_lru_resize || + log "Limit lock number by $LIMIT locks" + NR=$LIMIT + fi + + IFree=$(mdsrate_inodes_available) + if [ $IFree -lt $NR ]; then + log "Limit lock number by $IFree inodes" + NR=$IFree + fi + + lru_resize_disable mdc + test_mkdir -p $DIR/$tdir/disable_lru_resize || error "failed to create $DIR/$tdir/disable_lru_resize" createmany -o $DIR/$tdir/disable_lru_resize/f $NR