Whamcloud - gitweb
LU-16838 tests: use import name in 398a
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 19 May 2023 16:24:25 +0000 (12:24 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 7 Sep 2023 00:36:46 +0000 (00:36 +0000)
The LU-15670 test change assumes ost1_import is always
OST0000.  This isn't quite always true, so the test is
failing in certain configurations.

Change it to use the import name.

Lustre-change: https://review.whamcloud.com/51064
Lustre-commit: TBD (from 1927445073bc49c0941e72528590f626b80e9c8f)

Fixes: 649d638467 ("LU-15670 clio: Disable lockless for DIO with O_APPEND")
Test-parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ifaefc503d1118ecd6fd45b661cbe94607f7ad799
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52287
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index 68a8222..4375a8d 100755 (executable)
@@ -24931,7 +24931,7 @@ test_398a() { # LU-4198
                           ldlm.namespaces.$imp_name.lru_size)
        [[ $lock_count -eq 0 ]] || error "lock should be cancelled by direct IO"
 
-       $LCTL set_param ldlm.namespaces.*-OST0000-osc-ffff*.lru_size=clear
+       $LCTL set_param ldlm.namespaces.$imp_name.lru_size=clear
 
        # no lock cached, should use lockless DIO and not enqueue new lock
        dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 oflag=direct conv=notrunc
@@ -24939,13 +24939,13 @@ test_398a() { # LU-4198
                     ldlm.namespaces.$imp_name.lru_size)
        [[ $lock_count -eq 0 ]] || error "no lock should be held by direct IO"
 
-       $LCTL set_param ldlm.namespaces.*-OST0000-osc-ffff*.lru_size=clear
+       $LCTL set_param ldlm.namespaces.$imp_name.lru_size=clear
 
        # no lock cached, should use locked DIO append
        dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 oflag=direct oflag=append \
                conv=notrunc || error "DIO append failed"
        lock_count=$($LCTL get_param -n \
-                    ldlm.namespaces.*-OST0000-osc-ffff*.lru_size)
+                    ldlm.namespaces.$imp_name.lru_size)
        [[ $lock_count -ne 0 ]] || error "lock still must be held by DIO append"
 }
 run_test 398a "direct IO should cancel lock otherwise lockless"