Whamcloud - gitweb
LU-16100 tests: fix sanity/51d divide-by-zero 93/48393/2
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 30 Aug 2022 19:14:16 +0000 (13:14 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 5 Sep 2022 16:50:38 +0000 (16:50 +0000)
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 <adilger@whamcloud.com>
Change-Id: I787df4cfda9e62673e5f89d2b899154f636777fe
Reviewed-on: https://review.whamcloud.com/48393
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Feng, Lei <flei@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 4eb778a..a4a1aee 100755 (executable)
@@ -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,