Skip to content

Conversation

@TasmiyaNalatwad
Copy link

Added 2 test cases

  1. Inject EEH from host console for pci pt device
  2. Inject EEH from guest console for pci pt device

This patch captures multiple edge cases to test multivm scenarios. The following updates are added:

add stress_time parameter to run stress test for n seconds before starting stress_events
add debug_dir parameter to save the the debug files
add dump_options parameter to specify virsh dump type
update guest on_crash value to preserve in case of crash
add function check_call_traces to check for any call trace in dmesg
during stress, check for guest state and call traces every ten minutes
if any crashed vms, dump the vm to the debug_dir for further analysis
run stress_events in the remaining stable vms if present, else skip
check for error messages and fail the test if found

Signed-off-by: Misbah Anjum N <misanjum@linux.vnet.ibm.com>
@misanjumn
Copy link
Collaborator

@TasmiyaNalatwad
Hi Tasmiya, can you run pylint on your py scripts. I see errors in the script.

# pylint libvirt_pci_passthrough_eeh.py
************* Module libvirt_pci_passthrough_eeh
libvirt_pci_passthrough_eeh.py:287:0: C0301: Line too long (133/100) (line-too-long)
libvirt_pci_passthrough_eeh.py:1:0: C0114: Missing module docstring (missing-module-docstring)
libvirt_pci_passthrough_eeh.py:36:0: R0914: Too many local variables (56/15) (too-many-locals)
libvirt_pci_passthrough_eeh.py:112:41: E0606: Possibly using variable 'session' before assignment (possibly-used-before-assignment)
libvirt_pci_passthrough_eeh.py:121:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:148:40: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:152:24: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:153:24: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:155:24: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:164:23: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:245:31: E0602: Undefined variable 'fdisk_list_before' (undefined-variable)
libvirt_pci_passthrough_eeh.py:271:23: E1101: Module 'virttest.utils_misc' has no 'get_location_code' member (no-member)
libvirt_pci_passthrough_eeh.py:288:20: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
libvirt_pci_passthrough_eeh.py:298:12: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
libvirt_pci_passthrough_eeh.py:316:12: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
libvirt_pci_passthrough_eeh.py:316:26: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
libvirt_pci_passthrough_eeh.py:358:12: E0602: Undefined variable 'test_eeh_storage' (undefined-variable)
libvirt_pci_passthrough_eeh.py:36:0: R0912: Too many branches (16/12) (too-many-branches)
libvirt_pci_passthrough_eeh.py:36:0: R0915: Too many statements (220/50) (too-many-statements)
libvirt_pci_passthrough_eeh.py:77:4: W0612: Unused variable 'dargs' (unused-variable)
libvirt_pci_passthrough_eeh.py:17:0: C0411: standard import "platform" should be placed before third party import "aexpect" (wrong-import-order)
libvirt_pci_passthrough_eeh.py:18:0: C0411: standard import "time" should be placed before third party import "aexpect" (wrong-import-order)

------------------------------------------------------------------
Your code has been rated at 8.51/10 (previous run: 8.51/10, +0.00)

The pylint which throws E code are logical/syntactical errors.

@misanjumn
Copy link
Collaborator

Similarly, there are other errors which are to be tackled.
Kindly look into it,
Thank you.

Added 2 test cases
1. Inject EEH from host console for pci pt device
2. Inject EEH from guest console for pci pt device

Signed-off-by: Tasmiya Nalatwad <tasmiya@linux.vnet.ibm.com>
@TasmiyaNalatwad
Copy link
Author

@misanjumn I had executed pycodestyling to check the syntax and indentation errors already on this PR
What pylint is listing is not systax errors.

Still i have fixed some of them like removed f"strings, and shortened the lines.
The variable that is unused is written to add EEH for storage device, which Anushree will use that and add the code in her PR. The reason for keeping the variable is to maintain the code flow and keep adding new devices like storage and sriov in future, Anushree will use that and add the code further for storage.

Rest are like seen for all the .py files on tp_libvirt if you run the pylint on them.

Let me know any changes required

Thank You

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