From 1299e2aff9af57fc8a79a6fa09c1676a61cbfa4b Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Thu, 28 Jan 2016 14:54:35 -0800 Subject: [PATCH] LU-7584 tests: create file on single MDS in sanity test 129 In sanity test 129, it creates only one more file to check whether the directory size exceeds the limit or not. However, with DNE configuration, the new file might be created in a different stripe from the previous one that hit ENOSPC. So, directory size might not exceed the limit, which causes the test fail. Since the test is for checking ldiskfs dir size parameters, the patch just fixes it to create files on single MDS so as to make sure creating new files will increase the directory size. Test-Parameters: envdefinitions=ONLY=129 clientdistro=el7 ossdistro=el7 mdsdistro=el7 mdscount=2 mdtcount=4 testlist=sanity Signed-off-by: Jian Yu Change-Id: I75a2437fe3a4f6b160651d8704799ce8478a0041 Reviewed-on: http://review.whamcloud.com/18192 Tested-by: Jenkins Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: wangdi Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 2c239e4..ac1624c 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8729,7 +8729,7 @@ test_129() { has_warning=0 rm -rf $DIR/$tdir - test_mkdir -p $DIR/$tdir + mkdir -p $DIR/$tdir # block size of mds1 local MDT_DEV=$(mdsdevname ${SINGLEMDS//mds/}) @@ -8738,9 +8738,6 @@ test_129() { set_dir_limits $MAX $MAX local I=$(stat -c%s "$DIR/$tdir") local J=0 - local STRIPE_COUNT=1 - [[ $MDSCOUNT -ge 2 ]] && STRIPE_COUNT=$($LFS getdirstripe -c $DIR/$tdir) - MAX=$((MAX*STRIPE_COUNT)) while [[ $I -le $MAX ]]; do $MULTIOP $DIR/$tdir/$J Oc rc=$? @@ -8754,8 +8751,9 @@ test_129() { if [ $rc -eq $EFBIG -o $rc -eq $ENOSPC ]; then set_dir_limits 0 0 echo "return code $rc received as expected" - multiop $DIR/$tdir/$J Oc || - error_exit "multiop failed w/o dir size limit" + + createmany -o $DIR/$tdir/$J_file_ 1000 || + error_exit "create failed w/o dir size limit" check_mds_dmesg '"has reached"' || error_exit "has reached message should be output" -- 1.8.3.1