From 147d76e5ec9a0b86e0433c722ea223513ac4e11c Mon Sep 17 00:00:00 2001 From: Gordon Messmer Date: Sun, 28 Jul 2024 23:48:56 -0700 Subject: [PATCH] Collect journal data. --- Sanity/bodycheck/runtest.sh | 3 +++ Sanity/headercheck/runtest.sh | 3 +++ .../runtest.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Sanity/bodycheck/runtest.sh b/Sanity/bodycheck/runtest.sh index 439310e..8aad4db 100755 --- a/Sanity/bodycheck/runtest.sh +++ b/Sanity/bodycheck/runtest.sh @@ -149,6 +149,9 @@ EOF else rlServiceRestore "postfix" fi + # Collect journal data. If the test fails, the log probably + # explains why, which may be difficult to determine without logs. + rlRun "journalctl -b 0 > '$TMT_TEST_DATA'/journalctl.txt" rlPhaseEnd rlJournalPrintText rlJournalEnd diff --git a/Sanity/headercheck/runtest.sh b/Sanity/headercheck/runtest.sh index 1b48f26..58664af 100755 --- a/Sanity/headercheck/runtest.sh +++ b/Sanity/headercheck/runtest.sh @@ -148,6 +148,9 @@ EOF else rlServiceRestore "postfix" fi + # Collect journal data. If the test fails, the log probably + # explains why, which may be difficult to determine without logs. + rlRun "journalctl -b 0 > '$TMT_TEST_DATA'/journalctl.txt" rlPhaseEnd rlJournalPrintText rlJournalEnd diff --git a/Sanity/virtual-MAILBOX-separate-domains-non-UNIX-accounts/runtest.sh b/Sanity/virtual-MAILBOX-separate-domains-non-UNIX-accounts/runtest.sh index 90160ea..042b9c2 100755 --- a/Sanity/virtual-MAILBOX-separate-domains-non-UNIX-accounts/runtest.sh +++ b/Sanity/virtual-MAILBOX-separate-domains-non-UNIX-accounts/runtest.sh @@ -130,6 +130,9 @@ EOF rlRun "rm -rf /etc/postfix/vmailbox.$storagePostfix" rlRun "rm -rf /etc/postfix/virtual.$storagePostfix" rlServiceRestore "postfix" + # Collect journal data. If the test fails, the log probably + # explains why, which may be difficult to determine without logs. + rlRun "journalctl -b 0 > '$TMT_TEST_DATA'/journalctl.txt" rlPhaseEnd rlJournalPrintText rlJournalEnd