Whamcloud - gitweb
LU-8790 test: Limit lock number by available inodes count 43/23543/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Wed, 2 Nov 2016 14:32:39 +0000 (17:32 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:42:07 +0000 (05:42 +0000)
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 <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23543
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index c24dd3f..b423039 100755 (executable)
@@ -8746,11 +8746,18 @@ test_124b() {
 
        NR=$(($(default_lru_size)*20))
        if [[ $NR -gt $LIMIT ]]; then
 
        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
                error "failed to create $DIR/$tdir/disable_lru_resize"
 
         createmany -o $DIR/$tdir/disable_lru_resize/f $NR