From eaae1eab675c4cc6f93befc5cf9f531ed1ca24cc Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Wed, 5 May 2021 15:01:15 +0200 Subject: [PATCH] LU-14669 tests: reduce time spent in sanity-sec Several tests in sanity-sec loop over a number of nodemaps (16), a number of NID ranges (3), a number of IP addresses (6) and a number of mapped IDs (10). Whereas the benefits for test coverage of such a large number of combinations is not clear, looping over all this certainly takes a lot of time. So arbitrarily reduce that to smaller numbers in case SLOW!=yes: - 3 nodemaps; - 2 NID ranges; - 2 IP addresses; - 3 mapped ID This reduces the test time for sanity-sec from ~12000s to ~7500s. Similarly, test_fops function, used by tests 16,17,18,19,20,21,22, loops over a number of users (4), a number of mapped IDs (6), a number of permission bit masks (4), and for each client. Arbitrarily reduce that to smaller numbers in case SLOW!=yes, to save test time without degrading test coverage: - 2 users; - 4 mapped IDs; - 2 permission bit masks; - from only one client. This further reduces the test time from ~7500s to ~5000s. Test-Parameters: trivial Test-Parameters: mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 clientdistro=el8.3 serverdistro=el8.3 testlist=sanity-sec Test-Parameters: mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 clientdistro=el8.3 serverdistro=el8.3 testlist=sanity-sec env=SLOW=yes Signed-off-by: Sebastien Buisson Change-Id: Idbe9c8daca43feafe7ca6481902cf6b54e3fa87c Reviewed-on: https://review.whamcloud.com/43543 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/sanity-sec.sh | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 4655547..4c06c93 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -52,10 +52,17 @@ ID1=${ID1:-501} USER0=$(getent passwd | grep :$ID0:$ID0: | cut -d: -f1) USER1=$(getent passwd | grep :$ID1:$ID1: | cut -d: -f1) -NODEMAP_COUNT=16 -NODEMAP_RANGE_COUNT=3 -NODEMAP_IPADDR_LIST="1 10 64 128 200 250" -NODEMAP_ID_COUNT=10 +if [ "$SLOW" == "yes" ]; then + NODEMAP_COUNT=16 + NODEMAP_RANGE_COUNT=3 + NODEMAP_IPADDR_LIST="1 10 64 128 200 250" + NODEMAP_ID_COUNT=10 +else + NODEMAP_COUNT=3 + NODEMAP_RANGE_COUNT=2 + NODEMAP_IPADDR_LIST="1 250" + NODEMAP_ID_COUNT=3 +fi NODEMAP_MAX_ID=$((ID0 + NODEMAP_ID_COUNT)) [ -z "$USER0" ] && @@ -1441,18 +1448,26 @@ test_fops_chmod_dir() { test_fops() { local mapmode="$1" local single_client="$2" - local client_user_list=([0]="0 $((IDBASE+3)) $((IDBASE+4))" - [1]="0 $((IDBASE+5)) $((IDBASE+6))") + local client_user_list=([0]="0 $((IDBASE+3))" + [1]="0 $((IDBASE+5))") + local mds_users="-1 0" local mds_i local rc=0 - local perm_bit_list="0 3 $((0300)) $((0303))" + local perm_bit_list="3 $((0300))" # SLOW tests 000-007, 010-070, 100-700 (octal modes) - [ "$SLOW" == "yes" ] && + if [ "$SLOW" == "yes" ]; then perm_bit_list="0 $(seq 1 7) $(seq 8 8 63) $(seq 64 64 511) \ $((0303))" + client_user_list=([0]="0 $((IDBASE+3)) $((IDBASE+4))" + [1]="0 $((IDBASE+5)) $((IDBASE+6))") + mds_users="-1 0 1 2" + fi + # force single_client to speed up test + [ "$SLOW" == "yes" ] || + single_client=1 # step through mds users. -1 means root - for mds_i in -1 0 1 2; do + for mds_i in $mds_users; do local user=$((mds_i + IDBASE)) local client local x -- 1.8.3.1