From: Kienan Stewart Date: Tue, 23 Jan 2024 15:08:34 +0000 (-0500) Subject: tests: Add diagnostic info for kernel bug, warning, and oops X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f6fd58e865ae9918ca5c9b935c526140b1622f3c;p=lttng-tools.git tests: Add diagnostic info for kernel bug, warning, and oops 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 --- 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 }