Whamcloud - gitweb
EX-3409 tests: handle pcc async attach better
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 17 Sep 2021 21:40:28 +0000 (15:40 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 23 Sep 2021 03:49:57 +0000 (03:49 +0000)
Reset llite.*.pcc_async_threshold to the original value when the
subtest exits, so that it doesn't affect later tests.

Wait for async pcc attach to finish in test_47.

Test-Parameters: trivial testlist=sanity-pcc env=ONLY=46-47,ONLY_REPEAT=100
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Test-Parameters: testlist=sanity-pcc
Fixes: 6c693d126197 ("EX-3764 pcc: avoid panic in asynchronous attach thread")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9447fa1fc5ac20fd86340c2eda9bc08ba23ebbe5
Reviewed-on: https://review.whamcloud.com/44982
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
lustre/tests/sanity-pcc.sh

index 5051164..5cab684 100644 (file)
@@ -3359,6 +3359,7 @@ test_44() {
        setup_pcc_mapping client \
                "projid={0}\ roid=$HSM_ARCHIVE_NUMBER\ ropcc=1\ mmap_conv=0"
        $LCTL pcc list $MOUNT
+       stack_trap "$LCTL set_param llite.*.pcc_async_threshold=1G"
        $LCTL set_param llite.*.pcc_async_threshold=0
 
        dd if=/dev/zero of=$file bs=$bs count=$count ||
@@ -3575,7 +3576,7 @@ test_47() {
 
        sleep 3
        cat $file || error "cat $file failed"
-       check_lpcc_state $file "readonly" client
+       wait_readonly_attach_fini $file client
        mtime1=$(stat -c "%Y" $file)
 
        [ $mtime0 -eq $mtime1 ] || error "mtime changed from $mtime0 to $mtime1"