Whamcloud - gitweb
LU-12100 tests: Use least qunit to set limit 97/36797/8
authorNathaniel Clark <nclark@whamcloud.com>
Tue, 19 Nov 2019 14:52:45 +0000 (09:52 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 May 2020 08:24:35 +0000 (08:24 +0000)
Use least qunit to set lower limit for inodes in sanity-quota/2
This ensures that the limit is set at or above the minimum size.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-quota
Test-Parameters: testlist=sanity-quota fstype=zfs
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: I80e2c3cb66870d11f74f34c435e266a46630479b
Reviewed-on: https://review.whamcloud.com/36797
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh

index 90b80b0..43eafd8 100755 (executable)
@@ -1001,10 +1001,16 @@ run_test 1f "Quota pools: correct qunit after removing/adding OST"
 
 # test inode hardlimit
 test_2() {
-       local LIMIT=$((1024 * 1024)) # 1M inodes
        local TESTFILE="$DIR/$tdir/$tfile-0"
+       local LIMIT=$(do_facet mds1 $LCTL get_param -n \
+               qmt.$FSNAME-QMT0000.md-0x0.info |
+               awk '/least qunit/{ print $3 }')
+       local L2=$(do_facet mds1 $LCTL get_param -n \
+               qmt.$FSNAME-QMT0000.md-0x0.soft_least_qunit)
+
+       [ $L2 -le $LIMIT ] || LIMIT=$L2
 
-       [ "$SLOW" = "no" ] && LIMIT=1024 # 1k inodes
+       [ "$SLOW" = "no" ] || LIMIT=$((LIMIT * 1024))
 
        local FREE_INODES=$(mdt_free_inodes 0)
        echo "$FREE_INODES free inodes on master MDT"