Whamcloud - gitweb
LU-18288 tests: lru_resize_disable sets lru_max_age 42/56642/14
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 10 Oct 2024 02:01:25 +0000 (20:01 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 8 Nov 2024 20:44:08 +0000 (20:44 +0000)
commit2f946588daef34b54ed67734290973267915865e
tree78d9a66444b847c476a1d7767227216991bff295
parent94df21bb1088c112899d12af4411a15bc7adf6e5
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>
lustre/tests/sanity.sh
lustre/tests/test-framework.sh