Skip to content

Commit

Permalink
Adding debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
umfranci committed Feb 13, 2025
1 parent 6a350ab commit 595029e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lisa/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ def get_information(self) -> Dict[str, str]:
def exec_check_dmesg_oops(self) -> bool:
try:
dmesg = self.tools[Dmesg]
self.log.debug(f"Checking for errors in DMesg Logs")
results = dmesg.check_kernel_errors(force_run=True, throw_error=False)
if results:
# If there are any results obtained from the Kernel Error Check, then return True
Expand Down
2 changes: 2 additions & 0 deletions lisa/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ def __run_case(
case_result.set_status(TestStatus.PASSED, "")
nodes = case_result.environment.nodes
for node in nodes.list():
log.debug(f"Assert kernel Error: {node.assert_kernel_error}")
if node.assert_kernel_error:
self.__node_kernel_error_check(node, log)
except Exception as identifier:
Expand All @@ -867,6 +868,7 @@ def __run_case(

def __node_kernel_error_check(self, node: schema.NodeSpace, log: Logger) -> None:
dmesg_check_result = node.exec_check_dmesg_oops()
log.debug(f"dmesg_check_result: {dmesg_check_result}")
if dmesg_check_result:
raise LisaException(f"failed. Kernel Errors found in the DMesg logs after test case execution. Please check the same!")

Expand Down

0 comments on commit 595029e

Please sign in to comment.