From: Andreas Dilger Date: Tue, 30 Aug 2022 19:14:16 +0000 (-0600) Subject: LU-16100 tests: fix sanity/51d divide-by-zero X-Git-Tag: 2.15.52~42 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F48393%2F2;p=fs%2Flustre-release.git LU-16100 tests: fix sanity/51d divide-by-zero Fix dirstripe count when testing on non-DNE configs. Test-Parameters: trivial Fixes: cf35c54224b3 ("LU-14745 tests: ensure sanity/51d has enough objects") Signed-off-by: Andreas Dilger Change-Id: I787df4cfda9e62673e5f89d2b899154f636777fe Reviewed-on: https://review.whamcloud.com/48393 Reviewed-by: Alex Zhuravlev Reviewed-by: James Simmons Tested-by: jenkins Reviewed-by: Feng, Lei Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 4eb778a..a4a1aee 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5923,6 +5923,7 @@ test_51d() { test_mkdir $DIR/$tdir local dirstripes=$(lfs getdirstripe -c $DIR/$tdir) + (( dirstripes > 0 )) || dirstripes=1 # Ensure enough OST objects precreated for tests to pass without # running out of objects. This is an LOV r-r OST algorithm test,