Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a plugin for DMesg log analysis post TC Execution #3637

Closed
wants to merge 1 commit into from

Conversation

umfranci
Copy link
Collaborator

@umfranci umfranci commented Feb 7, 2025

  • The purpose of this Draft PR is to create a code for checking the DMesg logs for any exceptions once the test case execution is completed.
  • The execution will be done based on a switch - the default value of which would be false - hence avoiding any unnecessary failures/noise.
  • This can be later on extended to also check panic patterns or increase the scope of the checks executed after the test case is completed.

@@ -501,6 +502,11 @@ def get_information(self) -> Dict[str, str]:

return final_information

def exec_check_dmesg_oops(self) -> bool:
return plugin_manager.hook.check_dmesg_oops(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Group errors from different plugins, if it returns non-empty.
  2. Raise failure exception and let the upper layer to deal with it.

@@ -1186,6 +1192,9 @@ class NodeHookSpec:
def get_node_information(self, node: Node) -> Dict[str, str]:
...

@hookspec
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's only hooked in LISA upstream code, it doesn't need to use the hookspec. Just implement as a normal method.

@@ -752,6 +752,16 @@ def start(
log=case_log,
)

nodes = environment.nodes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move into __run_case after test passed, and let the handle_exception proceed the raised exception.

@@ -1444,6 +1444,8 @@ class Platform(TypedSchema, ExtendableSchemaMixin):
capture_azure_information: bool = False
# capture boot time info or not
capture_boot_time: bool = False
# to check if dmesg logs need to be analyzed after each test case
check_dmesg_after_case: bool = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert_kernel_error

@umfranci umfranci closed this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants