openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

Test Ipmi Payload #2234

Closed justin0309 closed 7 months ago

justin0309 commented 8 months ago

I would like to ask if you have encountered similar problems? I added channel_config.json (0-15) Unused channels are also changed to reserved. does not contain 'rsp=0xcc

image image image

gkeishin commented 8 months ago

@Ganesan149 can you respond to this?

justin0309 commented 8 months ago

@gkeishin I have found that the step of setting the user in the test item sometimes fails. This fail will appear in different test items from time to time. It seems random id sometimes fails

image

gkeishin commented 8 months ago

ok. if we can figure out what causes the intermittent failure would be great. Having said that probably there is a problem causing the user creation failure or failed to clean up.

justin0309 commented 8 months ago

1.Is the failure to set the user name related to the setting of the Privilege permission level?

`/xyz/openbmc_project/ipmi/sol/eth0:


image

ipmitool -I lanplus -C 17 -N 3 -p 623 -U root -P 0penBmc -H xx.xx.xx.xx user set name 6 ZqlZeWFU

image

2.It seems that the user that has been set previously will fail when the same user is randomly set during the next test.

  1. https://github.com/openbmc/openbmc/blob/acd0a499bf263b0f9f2657342f2d2efee4c778ae/meta-qualcomm/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json#L157 Regarding what SELF stands for, if there is no support, should it be changed to reserved or something like that? 4.This seems to happen in this test too https://github.com/openbmc/openbmc-test-automation/commit/a3b203c2b0b04b4fadda0765afe2d98a06c848d9
justin0309 commented 7 months ago

As far as I know, there is a problem with the determination of invalid user and invalid channel. If you need to meet the requirements of robot test, you should modify the test like this to pass

1.Verify Set User Access Payload For Invalid User https://github.com/openbmc/phosphor-host-ipmid/blob/ea46f3ca61dd12b210a74cf78e464c78e0987a47/user_channel/user_mgmt.cpp#L862C1-L862C1 std::string userName; userName.assign(reinterpret_cast<char>(userInfo->userName), 0, ipmiMaxUserName); if (userName.empty()) { log("User name not set / invalid"); return ccInvalidFieldRequest; } 2.Verify Get User Access Payload For Invalid User https://github.com/openbmc/phosphor-host-ipmid/blob/ea46f3ca61dd12b210a74cf78e464c78e0987a47/user_channel/user_layer.cpp#L213 std::string userName; userName.assign(reinterpret_cast<char>(userInfo->userName), 0, ipmiMaxUserName); if (userName.empty()) { return ccInvalidFieldRequest; } 3.Verify Get Channel Payload Support For Invalid Channel https://github.com/openbmc/phosphor-host-ipmid/blob/ea46f3ca61dd12b210a74cf78e464c78e0987a47/user_channel/channel_mgmt.cpp#L153 These codes below should be deleted,

if (!isValidChannel(chNum)) { log("Invalid channel number.", entry("CHANNEL_ID=%d", chNum)); throw std::invalid_argument("Invalid channel number"); }

gkeishin commented 7 months ago

These areas @Ganesan149 and @nagarjunb22 can help explain or look at it ..

gkeishin commented 7 months ago

@justin0309 posted a question to them on discord https://discord.gg/ygQcVkuD

may be you can as well join the discord to talk to them on it.

justin0309 commented 7 months ago

@gkeishin I think I have solved this problem, thank you