[LU-5842] sanity-sec tests 13 and 14 use a lot more time than necessary Created: 02/Nov/14  Updated: 05/Jun/15  Resolved: 03/Nov/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-5847 sanity-sec: lctl nodemap_test_nid on ... Resolved
Severity: 3
Rank (Obsolete): 16370

 Description   

It looks like tests 14 and 14 of sanity-sec.sh do neste loops 3 levels long: 16 x 3 x 256 and as such it takes 2600+ seconds each.
Sample run: https://testing.hpdd.intel.com/test_sets/ec53a19c-6144-11e4-a66b-5254006e85c2

The code:

        for ((i = 0; i < NODEMAP_COUNT; i++)); do
                for ((j = 0; j < NODEMAP_RANGE_COUNT; j++)); do
                        for ((k = 1; k < 253; k++)); do
                                if ! test_nid $SUBNET_CHECKSUM.$i.$j.$k \
                                       ${HOSTNAME_CHECKSUM}_${i}; then
                                        rc=$((rc + 1))
                                fi
                        done
                done
        done

This last loop could easily be transferred into:

for k in 1 10 64 128 200 250 ; do

for a great reduction in runtime and at the same - to space out the checks instead of checkign just some initial values
(as apparently was envisioned by now unused NODEMAP_IPADDR_COUNT variable that could be removed or replaced by NODEMAP_IPADDR_LIST to hold the values above instead for easy variability).



 Comments   
Comment by Andreas Dilger [ 02/Nov/14 ]

Kit, we were discussing similar issues with the tests about to be added in you other nodemap testing patch.

Comment by Kit Westneat [ 02/Nov/14 ]

Ok, should incorporate these changes into the new test patch?
http://review.whamcloud.com/#/c/10406/

Or would it be better to create a new small patch for quicker landing?

Comment by Andreas Dilger [ 02/Nov/14 ]

Probably better to have separate patches. No point to entangle two issues if they can land separately.

Comment by Kit Westneat [ 03/Nov/14 ]

Ok, I put up a new patch here:
http://review.whamcloud.com/#/c/12532/

Comment by Jodi Levi (Inactive) [ 03/Nov/14 ]

Patch landed to Master.

Generated at Sat Feb 10 01:55:00 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.