diff --git a/README b/README index 6e9aa34d..593c1052 100644 --- a/README +++ b/README @@ -101,6 +101,7 @@ Preparing system for tests: using nvme drives. - set USE_KMEMLEAK=yes to scan for memory leaks in the kernel after every test, if the kernel supports kmemleak. + - set KEEP_DMESG=yes to keep dmesg log after test - or add a case to the switch in common/config assigning these variables based on the hostname of your test diff --git a/common/config b/common/config index 1b75777f..9a9c7760 100644 --- a/common/config +++ b/common/config @@ -22,6 +22,9 @@ # RMT_IRIXTAPE_DEV- the IRIX remote tape device for the xfsdump tests # RMT_TAPE_USER - remote user for tape device # SELINUX_MOUNT_OPTIONS - Options to use when SELinux is enabled. +# KEEP_DMESG - whether to keep all dmesg for each test case. +# yes: keep all dmesg +# no: only keep dmesg with error/warning (default) # # - These can be added to $HOST_CONFIG_DIR (witch default to ./config) # below or a separate local configuration file can be used (using diff --git a/common/rc b/common/rc index e5535279..4688f236 100644 --- a/common/rc +++ b/common/rc @@ -3634,7 +3634,9 @@ _check_dmesg() _dump_err "_check_dmesg: something found in dmesg (see $seqres.dmesg)" return 1 else - rm -f $seqres.dmesg + if [ "$KEEP_DMESG" != "yes" ]; then + rm -f $seqres.dmesg + fi return 0 fi }