Whamcloud - gitweb
LU-2233 tests: improve tests sanityn/40-47 92/4392/8
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 29 Apr 2019 08:21:13 +0000 (11:21 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 10 May 2019 07:12:11 +0000 (07:12 +0000)
commit743b85a32e24cff0c77dff739691043970a0901e
treea0756a1b633abed7a637118f9407ba1630d46238
parenteb4f04e89fecbf6525f00288dbf26487f47103ba
LU-2233 tests: improve tests sanityn/40-47

sanity/40-46 usually take 800-900s which is almost a half
of the whole sanityn pass. 99.(9)% of time the tests just
wait to ensure specific order the operations execute in.

the patch changes cfs_fail_timeout_set() so that it can
interrupt waiting if fail_loc is set to 0 - polling with
1/10s frequency is used.

the tests itself are modified to reset fail_loc. to be
able to do so both operations (referenced as OP1 and OP2
in the tests) are run in background. once started and then
ensured with pdo_sched() helper that MDS threads got to the
blocking points, we can interrupt OP1 and do usual checks.

ONLY=40-47 sh sanityn.sh take: 1017s before and 78s after.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie01bd6a077333f6f57e533a73f38588a073a2381
Reviewed-on: https://review.whamcloud.com/4392
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
libcfs/libcfs/fail.c
lustre/tests/sanityn.sh