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

fixing multipath flush problem in module_load_unload.py #2761

Conversation

Naresh-ibm
Copy link
Collaborator

multipath flush was failing due to string not matching exactly as below,

nvme 55964 4
nvme_core 183368 5 nvme

we were expecting only : "nvme 55964 4"
the first line only. But it is matching all the line that contain the module name.
-w option resolve this as below.

nvme 55964 4

@Naresh-ibm
Copy link
Collaborator Author

Before fix



# avocado run --max-parallel-tasks=1 module_unload_load.py -m module_unload_load.py.data/module_unload_load.yaml
JOB ID     : ce44931ccf0d6e96f1e60b22245c32f80dcd6433
JOB LOG    : /root/avocado-fvt-wrapper/results/job-2024-02-14T04.04-ce44931/job.log
 (1/1) module_unload_load.py:ModuleLoadUnload.test;run-Parameters-eb01: STARTED
 (1/1) module_unload_load.py:ModuleLoadUnload.test;run-Parameters-eb01: ERROR: failed to flush the multipath (60.64 s)
RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /root/avocado-fvt-wrapper/results/job-2024-02-14T04.04-ce44931/results.html
JOB TIME   : 64.11 s

Test summary:
1-module_unload_load.py:ModuleLoadUnload.test;run-Parameters-eb01: ERROR

After FIx


# avocado run --max-parallel-tasks=1 module_unload_load.py -m module_unload_load.py.data/module_unload_load.yaml
JOB ID     : 65de3881c579af99bf23f1d54ead6f05380d885a
JOB LOG    : /root/avocado-fvt-wrapper/results/job-2024-02-14T05.07-65de388/job.log
 (1/1) module_unload_load.py:ModuleLoadUnload.test;run-Parameters-bf75: STARTED
 (1/1) module_unload_load.py:ModuleLoadUnload.test;run-Parameters-bf75: PASS (199.38 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /root/avocado-fvt-wrapper/results/job-2024-02-14T05.07-65de388/results.html
JOB TIME   : 202.55 s

@Naresh-ibm Naresh-ibm self-assigned this Feb 15, 2024
@@ -98,6 +98,7 @@ def module_load_unload(self, module_list):
for mod in sub_mod.split(' '):
if mod == 'multipath':
if self.flush_mpath(mdl) is False:
self.error("failed to flush the multipath")
self.error_modules.append(mdl)
Copy link
Collaborator

Choose a reason for hiding this comment

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

if the self.error is called,, it will not append in next line.. meaning the test exits

Copy link
Member

Choose a reason for hiding this comment

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

i say use self.fail instead of self. error

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ahh, that was just a pointer I have added to debug exact issue.
I have removed it. As we are capturing the module in a list and validating at the end of the test.
Hence it is not required here.
just removed that line. please re-check

multipath flush was failing due to string not matching exactly as below,

nvme                   55964  4
nvme_core             183368  5 nvme

we were expecting only : "nvme                   55964  4"
the first line only. But it is matching all the line that contain the module name.
-w option resolve this as below.

nvme                   55964  4

multipath is added in config file for nvme module.

Signed-off-by: Naresh Bannoth <[email protected]>
Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

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

@Naresh-ibm as praveen said, self.error is a config fail,, and if it is functional fail.. use self.fail, but here self.error_modules is a param.. so we are good

Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

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

LGTM

@Naresh-ibm Naresh-ibm merged commit 1727ece into avocado-framework-tests:master Feb 19, 2024
2 checks passed
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.

3 participants