From: Sebastien Buisson Date: Wed, 9 Dec 2020 17:53:12 +0000 (+0100) Subject: LU-14204 tests: make sure we have a single import X-Git-Tag: 2.12.8~27 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=1bc0c2eae29180fc8d49462252e742f92cc2d37c;p=fs%2Flustre-release.git LU-14204 tests: make sure we have a single import In sanity, retrieve the exact name of the import being used on the client, in order to properly get information such as lock_count or lru_size. Change-Id: I065b7da7990c7171d5baa24f3400c5f8ffc12fc9 Test-Parameters: trivial Signed-off-by: Sebastien Buisson Reviewed-on: https://review.whamcloud.com/40998 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 3f353ff..78c84af 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -17793,6 +17793,9 @@ test_255c() { [ $OST1_VERSION -lt $(version_code 2.10.50) ] && skip "lustre < 2.10.50 does not support lockahead" + local ost1_imp=$(get_osc_import_name client ost1) + local imp_name=$($LCTL list_param osc.$ost1_imp | head -n1 | + cut -d'.' -f2) local count local new_count local difference @@ -17840,7 +17843,7 @@ test_255c() { cancel_lru_locks osc count=$($LCTL get_param -n \ - ldlm.namespaces.$FSNAME-OST0000*osc-[-0-9a-f]*.lock_unused_count) + ldlm.namespaces.$imp_name.lock_unused_count) lockahead_test -d $DIR/$tdir -t $i -f $tfile rc=$? @@ -17849,7 +17852,7 @@ test_255c() { fi new_count=$($LCTL get_param -n \ - ldlm.namespaces.$FSNAME-OST0000*osc-[-0-9a-f]*.lock_unused_count) + ldlm.namespaces.$imp_name.lock_unused_count) difference="$((new_count - count))" # Test 15 output is divided by 100 to map down to valid return @@ -21756,6 +21759,10 @@ test_815() run_test 815 "zero byte tiny write doesn't hang (LU-12382)" test_816() { + local ost1_imp=$(get_osc_import_name client ost1) + local imp_name=$($LCTL list_param osc.$ost1_imp | head -n1 | + cut -d'.' -f2) + [ "$SHARED_KEY" = true ] && skip "OSC connections never go IDLE with Shared-Keys enabled" @@ -21769,12 +21776,12 @@ test_816() { local before local now before=$($LCTL get_param -n \ - ldlm.namespaces.$FSNAME-OST0000-osc-[^M]*.lru_size) + ldlm.namespaces.$imp_name.lru_size) wait_osc_import_state client ost1 IDLE dd if=/dev/null of=$DIR/$tfile bs=1k count=1 conv=sync now=$($LCTL get_param -n \ - ldlm.namespaces.$FSNAME-OST0000-osc-[^M]*.lru_size) + ldlm.namespaces.$imp_name.lru_size) [ $before == $now ] || error "lru_size changed $before != $now" } run_test 816 "do not reset lru_resize on idle reconnect"