From: James Nunez Date: Tue, 27 Aug 2019 15:39:02 +0000 (-0600) Subject: LU-11607 tests: replace lustre_version/fstype in posix/perf X-Git-Tag: 2.12.90~51 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=73cbcdfe749edd3a441084b90cb2b53f73fa86e4 LU-11607 tests: replace lustre_version/fstype in posix/perf The routine get_lustre_env() is available to all Lustre test suites and sets environment variables for the Lustre version and file system type for servers. In posix, performance-sanity, and parallel-scale, replace calls to lustre_version_code() and facet_fstype() for all server types with definitions from get_lustre_env(). While doing this, replace "$SINGLEMDS" with "$MDS1_VERSION" or "$mds1_FSTYPE" in lustre_version_code() and facet_fstype(). Clean up around any modifications by converting spaces to tabs. Test-Parameters: trivial testlist=posix,performance-sanity,parallel-scale Test-Parameters: fstype=zfs testlist=posix,performance-sanity,parallel-scale Signed-off-by: James Nunez Change-Id: Id7d3c2a50c7b880c1147e9b6c721fddff07861fa Reviewed-on: https://review.whamcloud.com/35934 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Wei Liu --- diff --git a/lustre/tests/parallel-scale.sh b/lustre/tests/parallel-scale.sh index 3cd3474..b7d9a82 100644 --- a/lustre/tests/parallel-scale.sh +++ b/lustre/tests/parallel-scale.sh @@ -11,7 +11,7 @@ init_logging # bug number for skipped test: LU-9429 ALWAYS_EXCEPT=" parallel_grouplock $PARALLEL_SCALE_EXCEPT " -if [ $(facet_fstype $SINGLEMDS) = zfs -o $(facet_fstype "ost1") = zfs ]; then +if [ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ]; then ZFSSLOW=$SLOW SLOW=no @@ -181,7 +181,8 @@ test_xdd () { } run_test xdd "xdd" -[ $(facet_fstype $SINGLEMDS) = zfs -o $(facet_fstype "ost1") = zfs ] && +# If necessary, return SLOW to its original value +[ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ] && SLOW=$ZFSSLOW complete $SECONDS diff --git a/lustre/tests/performance-sanity.sh b/lustre/tests/performance-sanity.sh index 698d310..cc27c3e 100644 --- a/lustre/tests/performance-sanity.sh +++ b/lustre/tests/performance-sanity.sh @@ -36,13 +36,13 @@ run_test 3 "small file create/open/delete ======" # mdsrate-create-large test_4() { - # LU-2600/LU-4108 - Decrease load on zfs - [ "$SLOW" = no -a $(facet_fstype $SINGLEMDS) = zfs ] && - NUM_FILES=10000 - echo "Large file creation performance" - bash mdsrate-create-large.sh + # LU-2600/LU-4108 - Decrease load on zfs + [ "$SLOW" = no -a "$mds1_FSTYPE" = zfs ] && + NUM_FILES=10000 + echo "Large file creation performance" + bash mdsrate-create-large.sh } -run_test 4 "large file create/open/delete ======" +run_test 4 "large file create/open/delete" # mdsrate-lookup-1dir test_5() { diff --git a/lustre/tests/posix.sh b/lustre/tests/posix.sh index 2f4e9f4..28cde8f 100755 --- a/lustre/tests/posix.sh +++ b/lustre/tests/posix.sh @@ -24,7 +24,7 @@ BASELINE_FS=${BASELINE_FS:-"ext4"} # SLES does not support read-write access to an ext4 file system by default [[ -e /etc/SuSE-release ]] && BASELINE_FS=ext3 -if [[ $(facet_fstype $SINGLEMDS) = zfs ]]; then +if [[ "$mds1_FSTYPE" = zfs ]]; then BASELINE_FS=zfs ! which $ZFS $ZPOOL >/dev/null 2>&1 && skip_env "need $ZFS and $ZPOOL commands"