Whamcloud - gitweb
LU-16465 tests: update sanity test 806 to use save/restore_opencache 06/50606/3
authorOleg Drokin <green@whamcloud.com>
Tue, 11 Apr 2023 20:22:38 +0000 (16:22 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Apr 2023 17:32:20 +0000 (17:32 +0000)
There are existing primitives to do this, so no need to opencode them

Fixes: dfb08bbf77 ("LU-16465 llite: fix LSOM blocks for ftruncate and close")
Test-Parameters: trivial testlist=sanity env=ONLY=806
Change-Id: Ibc0d34050999bfda8f56384752ede09cacc4df91
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50606
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
lustre/tests/sanity.sh

index d8d99db..11ba80a 100755 (executable)
@@ -28914,11 +28914,8 @@ test_806() {
 
        $LFS setstripe -c-1 $DIR/$tfile || error "setstripe $tfile failed"
 
-       # Disable opencache
-       local save="$TMP/$TESTSUITE-$TESTNAME.parameters"
-       save_lustre_params client "llite.*.opencache_threshold_count" > $save
-       lctl set_param llite.*.opencache_threshold_count=0
-       stack_trap "restore_lustre_params < $save; rm -f $save" EXIT
+       disable_opencache
+       stack_trap "restore_opencache"
 
        # single-threaded write
        echo "Test SOM for single-threaded write"