Skip to content

Conversation

@TasmiyaNalatwad
Copy link

Added EEH test cases where Inject EEH from host console for pci pt device

The file has below things covered

  1. Added a new variant in the cfg file to enable eeh test
  2. The function is added to identify the controller index. what the code does is fetches existing controllers, calculates the next available index, creates a new controller object with type, index, and model.
  3. Added a function to get network interface list inside guest. Before attaching/hotplug of any device i am trying to get the network interfaces list present inside guest. So that after hotplug of a NIC pci device one more interface gets added and i will be able to compare list of network interfaces before and after and verify the new interface.
  4. EEH injection is performed from host console for the passthrough device. The EEH logs will be seen in dmesg logs of the guest.

a) EEH can be triggered till max freeze count matches b) I am setting max freeze value as 5
c) Hence i can trigger EEH errors for 5 times, and 6th time the device should fail permanently and give this above msg saying "PERMANENT FAILURE". d) This is as per the EEH Feature Design
e) And permanent failure must be seen after max freeze count, if it is not failing even then it is an issue which is taken care in the code.

  1. To track the dmesg logs for every EEH injections i am maintaining a pointer to the last line of dmesg logs "last_dmesg_line".
  2. I am not clearing the dmesg logs bcz i want to print all the logs at the end of test case. This will be easy to debug for any kind of failures. As the EEH is triggered for multiple times, It is very important to keep all the dmesg logs to debug in case of any failures.

Added EEH test cases where Inject EEH from host console for pci pt device

The file has below things covered
1. Added a new variant in the cfg file to enable eeh test
2. The function is added to identify the controller index. what the code does is fetches existing controllers, calculates the next available index, creates a new controller object with type, index, and model.
3. Added a function to get network interface list inside guest. Before attaching/hotplug of any device i am trying to get the network interfaces list present inside guest. So that after hotplug of a NIC pci device one more interface gets added and i will be able to compare list of network interfaces before and after and verify the new interface.
4. EEH injection is performed from host console for the passthrough device. The EEH logs will be seen in dmesg logs of the guest.

a) EEH can be triggered till max freeze count matches
b) I am setting max freeze value as 5
c) Hence i can trigger EEH errors for 5 times, and 6th time the device should fail permanently and give this above msg saying "PERMANENT FAILURE".
d) This is as per the EEH Feature Design
e) And permanent failure must be seen after max freeze count, if it is not failing even then it is an issue which is taken care in the code.

5. To track the dmesg logs for every EEH injections i am maintaining a pointer to the last line of dmesg logs "last_dmesg_line".
6. I am not clearing the dmesg logs bcz i want to print all the logs at the end of test case. This will be easy to debug for any kind of failures. As the EEH is triggered for multiple times, It is very important to keep all the dmesg logs to debug in case of any failures.

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

Ref : autotest#6098

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.

1 participant