Whamcloud - gitweb
LU-18390 tests: dump debug logs during module unload correctly 67/56767/5
authorEmoly Liu <emoly@whamcloud.com>
Sun, 3 Nov 2024 10:31:12 +0000 (18:31 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 24 Nov 2024 06:08:05 +0000 (06:08 +0000)
commita29cff26051888a986380d57f0501d70d11dd743
tree038e864ce053bd8eb1ac78931a91a79eb99fc380
parent24846bddb405c563b7f92efd4a07e6c445cb44f3
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>
lustre/scripts/lustre_rmmod
lustre/tests/test-framework.sh