LU-18390 tests: dump debug logs during module unload correctly
If DEBUG is enabled, debug logs will be dumped to:
- $TMP/debug by default if DEBUG_RMMOD is unset. And if memory
leak is found, $TMP/debug will be renamed to $TMP/debug-leak.xxx;
- $DEBUG_RMMOD if $DEBUG_RMMOD is a full path name;
- $TMP/DEBUG_RMMOD if $DEBUG_RMMOD is a filename;
- standard output if DEBUG_RMMOD=- .
Memory leak in conf-sanity.sh test_29 in interop testing(LU-17962)
is used to verify this patch.
Test-Parameters: env=DEBUG=true,IGNORE_LEAK=yes,ONLY=29 \
testlist=conf-sanity serverversion=2.15 clientdistro=el8.10 \
serverdistro=el8.10 mdscount=2 mdtcount=4 ostcount=8
Test-Parameters: env=DEBUG_RMMOD=lu18390,IGNORE_LEAK=yes,ONLY=29 \
testlist=conf-sanity serverversion=2.15 clientdistro=el8.10 \
serverdistro=el8.10 mdscount=2 mdtcount=4 ostcount=8
Test-Parameters:trivial
Fixes:
255102e84e ("LU-16384 tests: dump lustre log if DEBUG_RMMOD set")
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I23a584541d0f9b313cf00e56f63dc4ac356c3cbc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56767
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>