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 <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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
}