Whamcloud - gitweb
LU-13366 tests: add SEL support to racer 59/37959/6
authorVitaly Fertman <c17818@cray.com>
Fri, 13 Mar 2020 12:47:00 +0000 (15:47 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Jul 2020 19:29:59 +0000 (19:29 +0000)
some files are created with a sel layout if RACER_ENABLE_SEL is set

Test-Parameters: testlist=racer envdefinitions="RACER_ENABLE_SEL=true"
Signed-off-by: Vitaly Fertman <c17818@cray.com>
Change-Id: I1f699988fdd0a0dbb19b71d6ea353d68326d0d5b
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Reviewed-on: https://es-gerrit.dev.cray.com/156106
HPE-bug-id: LUS-7591
Reviewed-on: https://review.whamcloud.com/37959
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/racer.sh
lustre/tests/racer/file_create.sh

index 892e9ea..03e5130 100644 (file)
@@ -61,6 +61,9 @@ fi
 [[ "$MDS1_VERSION" -lt $(version_code 2.10.55) ]] &&
        RACER_ENABLE_FLR=false
 
+[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.12.0) ]] &&
+       RACER_ENABLE_SEL=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}
@@ -68,6 +71,7 @@ RACER_ENABLE_SNAPSHOT=${RACER_ENABLE_SNAPSHOT:-true}
 RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true}
 RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true}
 RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true}
+RACER_ENABLE_SEL=${RACER_ENABLE_SEL:-true}
 
 fail_random_facet () {
        local facets=${victims[@]}
@@ -120,6 +124,7 @@ test_1() {
                        RACER_ENABLE_DOM=$RACER_ENABLE_DOM \
                        RACER_ENABLE_FLR=$RACER_ENABLE_FLR \
                        RACER_MAX_CLEANUP_WAIT=$RACER_MAX_CLEANUP_WAIT \
+                       RACER_ENABLE_SEL=$RACER_ENABLE_SEL \
                        LFS=$LFS \
                        LCTL=$LCTL \
                        $racer $rdir $NUM_RACER_THREADS" &
index f5fd90f..dcd4033 100755 (executable)
@@ -3,6 +3,7 @@ trap 'kill $(jobs -p)' EXIT
 RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true}
 RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true}
 RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true}
+RACER_ENABLE_SEL=${RACER_ENABLE_SEL:-true}
 DIR=$1
 MAX=$2
 MAX_MB=${RACER_MAX_MB:-8}
@@ -18,6 +19,9 @@ $RACER_ENABLE_DOM && layout+=(dom dom dom)
 # check if it supports FLR
 $RACER_ENABLE_FLR && layout+=(flr flr flr)
 
+# check if it supports PFL layout
+$RACER_ENABLE_SEL && layout+=(sel sel sel)
+
 echo "layout: ${layout[*]}"
 
 while /bin/true; do
@@ -27,7 +31,7 @@ while /bin/true; do
        stripecount=$((RANDOM % (OSTCOUNT + 1)))
 
        [ $stripecount -gt 0 ] && {
-               stripesize=$(((RANDOM % 16 + 1) * 64))K
+               stripesize=$(((1 << (RANDOM % 5)) * 64))K
                comp_end=$((${stripesize%K} * (RANDOM % 8 + 1)))K
                pattern=${layout[$RANDOM % ${#layout[*]}]}
 
@@ -35,6 +39,7 @@ while /bin/true; do
                dom) opt="setstripe -E $stripesize -L mdt -E eof -c $stripecount -S 1M" ;;
                pfl) opt="setstripe -E $comp_end -S $stripesize -E eof -c $stripecount -S 2M" ;;
                flr) opt="mirror create -N2 -E $comp_end -S $stripesize -E eof -c $stripecount -S 2M" ;;
+               sel) opt="setstripe -E 128M -S $stripesize -z 64M -E eof -c $stripecount -S 2M -z 128M" ;;
                raid0) opt="setstripe -S $stripesize -c $stripecount" ;;
                esac