From: Andreas Dilger Date: Thu, 12 Sep 2019 21:44:10 +0000 (-0600) Subject: LU-12704 tests: component end must be multiple of stripesize X-Git-Tag: 2.12.90~49 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=1cb7bdb883b0b19d944a4bee8403d0b5898a3998;hp=117c6fb787c8f22c93789e8db670833e737c4d24 LU-12704 tests: component end must be multiple of stripesize In racer file_create.sh, it was generating a random multiple of 64KB in [64K..1024K] for the stripe_size, but using a fixed 1MB component end. However, the component end must be a multiple of stripe_size, or an error will be returned by "lfs setstripe": Invalid layout: component end must be aligned by the stripe size Generate the component_end argument as a random multiple [1..8] of the stripe size for PFL, DoM, and FLR files. Fixes: 0b66b11523cb ("LU-3285 tests: add dom into racer test suite") Test-Parameters: trivial testlist=racer Signed-off-by: Andreas Dilger Change-Id: Ib79131fc71d0eaa4a398cd8c8adf6e53473ebbe5 Reviewed-on: https://review.whamcloud.com/36174 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/racer/file_create.sh b/lustre/tests/racer/file_create.sh index 2dba88a..f5fd90f 100755 --- a/lustre/tests/racer/file_create.sh +++ b/lustre/tests/racer/file_create.sh @@ -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