Whamcloud - gitweb
LU-12704 tests: component end must be multiple of stripesize
[fs/lustre-release.git] / lustre / tests / racer / file_create.sh
index 3b37858..f5fd90f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 trap 'kill $(jobs -p)' EXIT
 RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true}
-RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-false}
+RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true}
 RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true}
 DIR=$1
 MAX=$2
@@ -28,12 +28,13 @@ while /bin/true; do
 
        [ $stripecount -gt 0 ] && {
                stripesize=$(((RANDOM % 16 + 1) * 64))K
+               comp_end=$((${stripesize%K} * (RANDOM % 8 + 1)))K
                pattern=${layout[$RANDOM % ${#layout[*]}]}
 
                case $pattern in
                dom) opt="setstripe -E $stripesize -L mdt -E eof -c $stripecount -S 1M" ;;
-               pfl) opt="setstripe -E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
-               flr) opt="mirror create -N2 -E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
+               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" ;;
                raid0) opt="setstripe -S $stripesize -c $stripecount" ;;
                esac