openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

Ipmi.Test Ipmi Sdr.Test GPU SDR Info At Power On - passes when GPU not present #2154

Open generatz opened 2 years ago

generatz commented 2 years ago

When there is no GPU present the test still passes. That seems odd - other GPU tests don't pass if the GPU is not present. The documentation for the test doesn't clarify the expectation.

gkeishin commented 2 years ago

@rahulmah can you check on this one ?

gkeishin commented 2 years ago

or @AshwiniC777 please take a look

gkeishin commented 2 years ago
URI:https://xx.xx.xx.xx:443/xyz/openbmc_project/list, method:Get, args:{'headers': {'X-Auth-Token': 'Pf5ZdNrzj959cqNkpnNf', 'Accept': 'application/json'}}
Response code:404, Content:Not Found
Test GPU SDR Info At Power On :: Verify GPU SDR info via IPMI and ... | FAIL |
Parent suite setup failed:
404 != 200

not sure it shouldn't be working, at least on Redfish since it needs the new changes for it.. but yeah for older REST, it probably might but it could be a bug from the firmware end and not from test code.. @generatz

generatz commented 2 years ago

This patch works for me:

diff --git a/ipmi/test_ipmi_sdr.robot b/ipmi/test_ipmi_sdr.robot
index 34f357e8..f9bd70f4 100755
--- a/ipmi/test_ipmi_sdr.robot
+++ b/ipmi/test_ipmi_sdr.robot
@@ -275,6 +275,8 @@ Test SDR Info
     # component_name    Component name (e.g. "core", "dimm", etc.).

     ${component_uri_list}=  Get Component URIs  ${component_name}
+    ${length}=  Get Length  ${component_uri_list}
+    Skip If  '${length}'=='0'  msg=${component_name} not found.

     FOR  ${uri}  IN  @{component_uri_list}
       ${component_name}=  Fetch From Right  ${uri}  motherboard/