From 05a5ed7b89d6321ccc6f28b61a2ac2cdee108f1a Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 13 Jul 2018 14:44:39 -0600 Subject: [PATCH] LU-10254 tests: fix racer version checks Fix the checks for enabling DOM, PFL, and FLR tests in file_create.sh. The $LCTL variable was unset in the test script, so the version check was failing. Instead of doing the version check inside file_create.sh do it in the Lustre-specific racer.sh test script, where other version checks live. This enables PFL and FLR testing by default, but leaves DOM tests off. Author: Andreas Dilger Test-Parameters: trivial testlist=racer envdefinitions=SLOW=yes Test-Parameters: testlist=racer mdtfilesystemtype=zfs ostfilesystemtype=zfs Signed-off-by: Andreas Dilger Signed-off-by: James Nunez Change-Id: I2aeab0911f19f9741212925cf9b4aeb70e3ebbe5 Reviewed-on: https://review.whamcloud.com/30307 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/tests/racer.sh | 15 ++++++++++++++- lustre/tests/racer/file_create.sh | 18 ++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lustre/tests/racer.sh b/lustre/tests/racer.sh index e6220c5..ea70258 100644 --- a/lustre/tests/racer.sh +++ b/lustre/tests/racer.sh @@ -39,11 +39,22 @@ fi [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.54) || $(facet_fstype mgs) != zfs ]] && RACER_ENABLE_SNAPSHOT=false +[[ $(lustre_version_code $SINGLEMDS) -le $(version_code 2.9.55) ]] && + RACER_ENABLE_PFL=false + +[[ $(lustre_version_code $SINGLEMDS) -le $(version_code 2.10.53) ]] && + RACER_ENABLE_DOM=false + +[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ]] && + RACER_ENABLE_FLR=false + RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-false} RACER_ENABLE_STRIPED_DIRS=${RACER_ENABLE_STRIPED_DIRS:-false} RACER_ENABLE_MIGRATION=${RACER_ENABLE_MIGRATION:-false} RACER_ENABLE_SNAPSHOT=${RACER_ENABLE_SNAPSHOT:-true} +RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true} RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-false} +RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true} check_progs_installed $CLIENTS $racer || { skip_env "$racer not found" && exit 0; } @@ -76,11 +87,13 @@ test_1() { local rpids="" for rdir in $RDIRS; do do_nodes $clients "DURATION=$DURATION \ - MDSCOUNT=$MDSCOUNT \ + MDSCOUNT=$MDSCOUNT OSTCOUNT=$OSTCOUNT\ RACER_ENABLE_REMOTE_DIRS=$RACER_ENABLE_REMOTE_DIRS \ RACER_ENABLE_STRIPED_DIRS=$RACER_ENABLE_STRIPED_DIRS \ RACER_ENABLE_MIGRATION=$RACER_ENABLE_MIGRATION \ + RACER_ENABLE_PFL=$RACER_ENABLE_PFL \ RACER_ENABLE_DOM=$RACER_ENABLE_DOM \ + RACER_ENABLE_FLR=$RACER_ENABLE_FLR \ LFS=$LFS \ $racer $rdir $NUM_RACER_THREADS" & pid=$! diff --git a/lustre/tests/racer/file_create.sh b/lustre/tests/racer/file_create.sh index 3721e31..3b37858 100755 --- a/lustre/tests/racer/file_create.sh +++ b/lustre/tests/racer/file_create.sh @@ -1,28 +1,22 @@ #!/bin/bash trap 'kill $(jobs -p)' EXIT +RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true} RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-false} +RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true} DIR=$1 MAX=$2 MAX_MB=${RACER_MAX_MB:-8} -. $LUSTRE/tests/test-framework.sh - -OSTCOUNT=${OSTCOUNT:-$($LFS df $DIR 2> /dev/null | grep -c OST)} - layout=(raid0 raid0) # check if it supports PFL layout -[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.0) ]] && - layout+=(pfl pfl pfl) +$RACER_ENABLE_PFL && layout+=(pfl pfl pfl) # check if it supports DoM -if $RACER_ENABLE_DOM ; then - [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.53) ]] && - layout+=(dom dom dom) -fi +$RACER_ENABLE_DOM && layout+=(dom dom dom) -[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.55) ]] && - layout+=(flr flr flr) +# check if it supports FLR +$RACER_ENABLE_FLR && layout+=(flr flr flr) echo "layout: ${layout[*]}" -- 1.8.3.1