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 <sbuisson@ddn.com>
Change-Id: Idbe9c8daca43feafe7ca6481902cf6b54e3fa87c
Reviewed-on: https://review.whamcloud.com/43543
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
USER0=$(getent passwd | grep :$ID0:$ID0: | cut -d: -f1)
USER1=$(getent passwd | grep :$ID1:$ID1: | cut -d: -f1)
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" ] &&
NODEMAP_MAX_ID=$((ID0 + NODEMAP_ID_COUNT))
[ -z "$USER0" ] &&
test_fops() {
local mapmode="$1"
local single_client="$2"
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 perm_bit_list="0 3 $((0300)) $((0303))"
+ local perm_bit_list="3 $((0300))"
# SLOW tests 000-007, 010-070, 100-700 (octal modes)
# 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))"
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
# 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
local user=$((mds_i + IDBASE))
local client
local x