openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

Test PostCodes When Host Reboot #2228

Closed justin0309 closed 8 months ago

justin0309 commented 8 months ago

After restarting, postal code cannot be obtained. I can’t see what the error is in the log.

image

image

Test PostCodes When Host Reboot [Documentation] Initiate Host reboot the system and verify PostCodes from host are logged. [Tags] Test_PostCodes_When_Host_Reboot

# Boot to runtime and clear post codes.
Redfish Power On  stack_mode=skip
Redfish Clear PostCodes

RF SYS GracefulRestart
${post_code_list}=  Redfish Get PostCodes
Rprint Vars  post_code_list

${post_codes}=  Redfish.Get Properties
...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
Log To Console  BIOS POST Codes count: ${post_codes['Members@odata.count']}
Should Be True  ${post_codes['Members@odata.count']} >= 1  msg=No BIOS POST Codes populated.
gkeishin commented 8 months ago

@aravinth0510 can u look at this ?

aravinth0510 commented 8 months ago

Hi @gkeishin , I tried running the same test. I can see post code generated in /system/LogServices/PostCodes/Entries after host system reboot in my environment. But From the screenshot what Justin has shared, I could see that the post code entries collection is empty after system reboot. Ideally RF SYS GracefulRestart should have triggered some post code entries, since the system powers on from off state. The firmware behaviour is different and there is no change required from the test script.

justin0309 commented 8 months ago

Hi, @aravinth0510

So what should I do? In RF SYS GracefulRestart, the host status is off, so I temporarily turn the host on manually. My understanding is that the postal code information will be released after the host is powered on. Or, when upgrading from the v3.0-stable version to the master version, there are bug fixes in this part, but I tried to find this part and it seems that it has not changed.

aravinth0510 commented 8 months ago

Hi @justin0309 , I have tested the code base in master version, and the keyword RF SYS GracefulRestart worked fine for me. Yes, the post code entries should be posted after the host is powered on ideally. And I can see that, the TC "Test PostCodes When Host Boots" is PASS for you as well.

As you have pointed, in your case RF SYS GracefulRestart did not power on the host system after off. So, I think the firmware you are using is not working as expected and hence you are not seeing post code entries getting populated after host reboot. So there is nothing I could do to help you regarding the firmware issue. @gkeishin kindly share your thoughts on this.

justin0309 commented 8 months ago

It seems that our machine does not support warm_reboot. I added EXTRA_OEMESON: append = "-Dwarm-reboot=disabled". Then the test item passed normally. RF SYS GracefulRestart worked fine.Is this the right modification for me?

gkeishin commented 8 months ago

I believe so but not an expert to comment on the firmware config on your machine. but if that works out well, that's good to know..

@justin0309