From f6fd58e865ae9918ca5c9b935c526140b1622f3c Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 23 Jan 2024 10:08:34 -0500 Subject: [PATCH] tests: Add diagnostic info for kernel bug, warning, and oops MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When test_select_poll_epoll fails with an error due to hitting one a new WARNING, OOPS, or BUG statements in dmesg, the user must go and read the the logs themselves to try and find the matching statements. Providing the previous and new messages in diagnostic output will allow a person reading the test results to more quickly ascertain if the messages are pertinent to lttng-modules or not. That being said, there is no guarantee that there are not other WARNINGs, OOPs, or BUGs in dmesg between before and after that are pertinent. Change-Id: Ida026dfe852cafdcc55979089c92995949e2ef0d Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- tests/regression/kernel/test_select_poll_epoll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/regression/kernel/test_select_poll_epoll b/tests/regression/kernel/test_select_poll_epoll index 09c911df9..a359945cd 100755 --- a/tests/regression/kernel/test_select_poll_epoll +++ b/tests/regression/kernel/test_select_poll_epoll @@ -390,12 +390,18 @@ check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." || NEW_BUG=$(dmesg | grep " BUG:" | cut -d' ' -f1 | tail -1) if test "$LAST_WARNING" != "$NEW_WARNING"; then + diag "Last WARNING before tests: ${LAST_WARNING}" + diag "Last WARNING after tests: ${NEW_WARNING}" fail "New WARNING generated" fi if test "$LAST_OOPS" != "$NEW_OOPS"; then + diag "Last OOPS before tests: ${LAST_OOPS}" + diag "Last OOPS after tests: ${NEW_OOPS}" fail "New OOPS generated" fi if test "$LAST_BUG" != "$NEW_BUG"; then + diag "Last BUG before tests: ${LAST_BUG}" + diag "Last BUG after tests: ${NEW_BUG}" fail "New BUG generated" fi } -- 2.34.1