Whamcloud - gitweb
LU-11768 test: make at_max to take effect 45/41345/2
authorHongchao Zhang <hongchao@whamcloud.com>
Thu, 10 Oct 2019 20:22:25 +0000 (16:22 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Sep 2021 19:06:55 +0000 (19:06 +0000)
In test_6 of sanity-quota, the "at_max" won't affect
the "at_current" if there is no RPC to be sent in that
import, which still makes the following DQACQ request
to have larger timeout value and triggers watchdog.

Lustre-change: https://review.whamcloud.com/36431
Lustre-commit: 550af84a91505c85824ffad2990d31c8e8ab4dd9

Fixes: d8226b93 ("LU-11768 test: limit at_max to timeout in time")
Test-Parameters: trivial testlist=sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: Iccc969459647aa70da6f6ecb0d8d13a404bf8088
Reviewed-on: https://review.whamcloud.com/41345
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh

index 2e698e2..872b81f 100755 (executable)
@@ -1208,6 +1208,19 @@ test_6() {
                error "write $TESTFILE failure, expect success"
        $RUNAS2 $DD of=$TESTFILE2 count=1 ||
                error "write $TESTFILE2 failure, expect success"
+
+       if at_is_enabled; then
+               at_max_saved=$(at_max_get ost1)
+               at_max_set $TIMEOUT ost1
+
+               # write to enforced ID ($TSTUSR) to exceed limit to make sure
+               # DQACQ is sent, which makes at_max to take effect
+               $RUNAS $DD of=$TESTFILE count=$LIMIT seek=1 oflag=sync \
+                                                               conv=notrunc
+               rm -f $TESTFILE
+               wait_delete_completed
+       fi
+
        sync; sync
        sync_all_data || true
 
@@ -1215,11 +1228,6 @@ test_6() {
        #define OBD_FAIL_PTLRPC_DROP_REQ_OPC 0x513
        lustre_fail mds 0x513 601
 
-       if at_is_enabled; then
-               at_max_saved=$(at_max_get ost1)
-               at_max_set $TIMEOUT ost1
-       fi
-
        do_facet ost1 $LCTL set_param \
                        osd-*.$FSNAME-OST*.quota_slave.timeout=$((TIMEOUT / 2))