Whamcloud - gitweb
LU-6710 tests: Constrain stripe index conf-sanity test 82a 24/15824/3
authorJames Nunez <james.a.nunez@intel.com>
Fri, 31 Jul 2015 21:00:03 +0000 (15:00 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 9 Jan 2016 00:06:15 +0000 (00:06 +0000)
conf-sanity test 82a specifies the OSTs to stripe a file over.
The OST index is computed as RANDOM * 2 for a maximum of 65534.
Yet, the maximum stripe count is 65532. Thus, the OST index in
conf-sanity test 82a needs to be limited.

Also, change the single use of the deprecated
llapi_stripe_offset_is_valid() to llapi_stripe_index_is_valid().

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I4ceb44d639b88527105c1e8812cbd7590d041316
Reviewed-on: http://review.whamcloud.com/15824
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/conf-sanity.sh
lustre/utils/liblustreapi.c

index 60f80d9..e18dd58 100644 (file)
@@ -5428,8 +5428,9 @@ test_82a() { # LU-4665
        local i
        local index
        local ost_indices
+       local LOV_V1_INSANE_STRIPE_COUNT=65532
        for i in $(seq $OSTCOUNT); do
-               index=$((RANDOM * 2))
+               index=$(((RANDOM * 2) % LOV_V1_INSANE_STRIPE_COUNT))
                ost_indices+=" $index"
        done
        ost_indices=$(comma_list $ost_indices)
@@ -5535,8 +5536,9 @@ test_82b() { # LU-4665
        local i
        local index
        local ost_indices
+       local LOV_V1_INSANE_STRIPE_COUNT=65532
        for i in $(seq $OSTCOUNT); do
-               index=$((RANDOM * 2))
+               index=$(((RANDOM * 2) % LOV_V1_INSANE_STRIPE_COUNT))
                ost_indices+=" $index"
        done
        ost_indices=$(comma_list $ost_indices)
index 094996a..1f9c35f 100644 (file)
@@ -274,7 +274,7 @@ int llapi_stripe_limit_check(unsigned long long stripe_size, int stripe_offset,
                                stripe_size, page_size);
                return rc;
        }
-       if (!llapi_stripe_offset_is_valid(stripe_offset)) {
+       if (!llapi_stripe_index_is_valid(stripe_offset)) {
                rc = -EINVAL;
                llapi_error(LLAPI_MSG_ERROR, rc, "error: bad stripe offset %d",
                                stripe_offset);