Whamcloud - gitweb
LU-7584 tests: create file on single MDS in sanity test 129 92/18192/8
authorJian Yu <jian.yu@intel.com>
Thu, 28 Jan 2016 22:54:35 +0000 (14:54 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Feb 2016 14:56:28 +0000 (14:56 +0000)
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 <jian.yu@intel.com>
Change-Id: I75a2437fe3a4f6b160651d8704799ce8478a0041
Reviewed-on: http://review.whamcloud.com/18192
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index 2c239e4..ac1624c 100755 (executable)
@@ -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"