openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

Add an option to bypass 'BootProgress' check for systems that don't implement it #2106

Closed Kostr closed 3 years ago

Kostr commented 3 years ago

BootProgress interface is implemented in the phosphor-state-manager application and is used in OpenPOWER platforms. For x86 systems it is the x86-power-control aplication that implements the related power interfaces. But currently it does not implement the BootProgress interface. https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/State/Boot/Progress.interface.yaml

Because of this most of the tests fail on my AMD EthanolX platform with the message:

**ERROR** The state dictionary contains blank fields which is illegal.
state:
  [rest]:                                         1
  [bmc]:                                          Ready
  [chassis]:                                      Off
  [host]:                                         Off
  [operating_system]:                             Standby
  [epoch_seconds]:                                1615199007
  [boot_progress]:

To make the openbmc-test-automation framework usable for non-OpenPOWER platforms it is necessary to add an option to bypass this BootProgress interface check.

gkeishin commented 3 years ago

@Kostr let me check on it..

gkeishin commented 3 years ago

@Kostr give a try this patch

https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/41168

Cherry pick this and run with option in robot CLI

-v BOOT_TABLE_PATH:data/boot_table_x86.json

Looking for more better solution.. but check this out if this unblock your testing. let me know

Kostr commented 3 years ago

Hi @gkeishin ! Thanks for the patch! Sorry for the long answer. I'm still working on testing openbmc-test-automation framework, trying to investigate all the problems on x86 machines. This patch is definitely useful and it solves the issue that I've reported here. With it applied many tests can be executed. So maybe this patch could be merged afterall?

But it seems like there are more problems.

For example it seems like 'NA' should be added to DotDicts in lib/state.py. I had troubles with some tests before I've added:

master_os_up_match = DotDict([('chassis', '^On$'),
                              ('bmc', '^Ready$'),
                              ('boot_progress',
                               'FW Progress, Starting OS|OSStart|NA'),   # <--- NA
                              ('operating_system', 'BootComplete'),
                              ('host', '^Running|Quiesced$')])

Also, operating_system interface on my machine only have two states "Inactive" and "Standby". If this is common for all x86 machines, maybe it should be 'NA'ed too.

And lastly, on failure FFDC tries to capture PEL which is also doesn't relevant for x86 machines.

So maybe it would be best to add an x86 option, which would cover all the aforementioned differences between OpenPOWER and x86 machines?

gkeishin commented 3 years ago

First patchset merged

https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/41168

remaining request

gkeishin commented 3 years ago

@Kostr I think we can close this now ? since all the pieces required are in.

Kostr commented 3 years ago

@gkeishin Yeah, this already has gone too far from the initial issue "bypass 'BootProgress'" to full x86 support. Everything is working fine for me now. If you don't want to wait for your commit "Filter based on REDFISH_SUPPORT_TRANS_STATE for x86 for redfish path" (https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/41587) I think we can close this issue.

gkeishin commented 3 years ago

Yeah lets not wait for that commit.. it opened up other problem at the moment.. I ll keep checking and working on those ahead..

Please close this one. .Thanks