From: Elena Gryaznova Date: Tue, 26 Apr 2022 13:37:27 +0000 (+0300) Subject: LU-15785 tests: do not detect versions for RPC_MODE mode X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=62ac71071b1d45a91299135bde4d28c9858e4d84;p=fs%2Flustre-release.git LU-15785 tests: do not detect versions for RPC_MODE mode lustre_version_code() is called each time when do_rpc_nodes() is called. It is not needed to detect versions for RPC_MODE mode. Lustre-change: https://review.whamcloud.com/47144 Lustre-change: e3fcd81ae5f378ac62754a659c7adf0e0b656cf3 Fixes: 8fa23490bb ("LU-1538 tests: standardize test script init - sanity") Signed-off-by: Elena Gryaznova HPE-bug-id: LUS-10914 Change-Id: Ia7645de0a4eedfddf859c80e661ebcb2e45de140 Reviewed-by: Andreas Dilger Reviewed-by: Vladimir Saveliev Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55272 Tested-by: jenkins Tested-by: Andreas Dilger --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index efefe24..19735d2 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -158,25 +158,26 @@ print_summary () { # output: No return values, environment variables are exported get_lustre_env() { - - export mds1_FSTYPE=${mds1_FSTYPE:-$(facet_fstype mds1)} - export ost1_FSTYPE=${ost1_FSTYPE:-$(facet_fstype ost1)} - - export MGS_VERSION=$(lustre_version_code mgs) - export MDS1_VERSION=$(lustre_version_code mds1) - export OST1_VERSION=$(lustre_version_code ost1) - export CLIENT_VERSION=$(lustre_version_code client) - - # import server-side version information into local variables - # so they can be used in tests instead of checked separately - # MGS_OS_VERSION_ID, MGS_OS_ID, MGS_OS_ID_LIKE, - # MDS1_OS_VERSION_ID, MDS1_OS_ID, MDS1_OS_ID_LIKE, - # OST1_OS_VERSION_ID, OST1_OS_ID, OST1_OS_ID_LIKE, - # CLIENT_OS_VERSION_ID, CLIENT_OS_ID, CLIENT_OS_ID_LIKE - lustre_os_release mgs - lustre_os_release mds1 - lustre_os_release ost1 - lustre_os_release client + if ! $RPC_MODE; then + export mds1_FSTYPE=${mds1_FSTYPE:-$(facet_fstype mds1)} + export ost1_FSTYPE=${ost1_FSTYPE:-$(facet_fstype ost1)} + + export MGS_VERSION=$(lustre_version_code mgs) + export MDS1_VERSION=$(lustre_version_code mds1) + export OST1_VERSION=$(lustre_version_code ost1) + export CLIENT_VERSION=$(lustre_version_code client) + + # import server-side version information into local variables + # so they can be used in tests instead of checked separately + # MGS_OS_VERSION_ID, MGS_OS_ID, MGS_OS_ID_LIKE, + # MDS1_OS_VERSION_ID, MDS1_OS_ID, MDS1_OS_ID_LIKE, + # OST1_OS_VERSION_ID, OST1_OS_ID, OST1_OS_ID_LIKE, + # CLIENT_OS_VERSION_ID, CLIENT_OS_ID, CLIENT_OS_ID_LIKE + lustre_os_release mgs + lustre_os_release mds1 + lustre_os_release ost1 + lustre_os_release client + fi # Prefer using "mds1" directly instead of SINGLEMDS. # Keep this for compat until it is removed from scripts.