LU-18288 tests: lru_resize_disable sets lru_max_age
sanity test_120* has started failing much more regularly since the
lru_max_age=600s was made the default. This is caused by DLM locks
being aged out of the LRU during the test and confuses the result.
Set lru_max_age to the old (65 min) limit in lru_resize_disable()
for tests that don't want locks to be cancelled during the subtest.
Register a stack_trap in lru_resize_disable() to reset lru_max_age
to the old value, so that the caller does not need to remember this.
Resetting lru_size to the "old" value cannot be done directly, since
it returns the number of locks in the LRU, and not the LRU size limit.
Instead, register lru_resize_enable() with stack_trap() to reset it.
Add debugging to test cases that were failing with earlier versions
of this patch, to help understand similar failures in the future.
Script code style fixes in modified subtests.
Fixes:
357cae970c ("LU-17428 ldlm: reduce default lru_max_age")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I82ee177eae14f3030a9e92e3aca86e4c47401ff5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56642
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>