From f6aec179cf99b96520b3dd48cabe198df6d41a22 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 17 Sep 2021 15:40:28 -0600 Subject: [PATCH] EX-3409 tests: handle pcc async attach better 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 Change-Id: I9447fa1fc5ac20fd86340c2eda9bc08ba23ebbe5 Reviewed-on: https://review.whamcloud.com/44982 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Yingjin Qian --- lustre/tests/sanity-pcc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/tests/sanity-pcc.sh b/lustre/tests/sanity-pcc.sh index 5051164..5cab684 100644 --- a/lustre/tests/sanity-pcc.sh +++ b/lustre/tests/sanity-pcc.sh @@ -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" -- 1.8.3.1