openbmc / openbmc-test-automation

Apache License 2.0
106 stars 92 forks source link

Verify Get Device ID Test needs logic update #1275

Closed gkeishin closed 6 years ago

gkeishin commented 6 years ago
-bash-4.1$  ./ipmitool -I lanplus -H xx.xx.xx.xx -P 0penBmc -C 1 mc info
Device ID                 : 0
Device Revision           : 0
Firmware Revision         : 2.01
IPMI Version              : 2.0
Manufacturer ID           : 42817
Manufacturer Name         : Unknown (0xA741)
Product ID                : 16975 (0x424f)
Product Name              : Unknown (0x424F)
Device Available          : yes
Provides Device SDRs      : yes
Additional Device Support :
    Sensor Device
    SEL Device
    FRU Inventory Device
    Chassis Device
Aux Firmware Rev Info     : 
    0x00
    0x00
    0x00
    0x0

    Documentation:  

Fails if the given objects are unequal.
Start / End / Elapsed:  20180223 21:45:27.686 / 20180223 21:45:27.687 / 00:00:00.001
21:45:27.687    FAIL    2.01 != 2.1

-bash-4.1$ vim tests/ipmi/test_general_ipmi.robot
-bash-4.1$ ssh root@wsbmc011
root@wsbmc011's password:
root@witherspoon:~# cat /etc/os-release
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="v2.1-136"
VERSION_ID="v2.1-136-g7e07431"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) v2.1-136"
BUILD_ID="v2.1"
root@witherspoon:~#
gkeishin commented 6 years ago

Looks like this is a code bug from Dev.. discussing with @tomjoseph83

gkeishin commented 6 years ago

Yup this is a FW bug.. closing it

AlexanderAmelkin commented 6 years ago

@gkeishin, it's unclear what is proposed to do with it and why the issue is closed.

To me it looks indeed like a bug... in test logic. The IPMI major and minor version fields contain BCD-encoded data and simply can not contain pure "1". It will always be two digits by the nature of BCD encoding. The test on the other hand should not treat BUILD_ID as text and/or perform textual comparison. It should take it as two integers (2 and 1) and then compare them to IPMI response as integers.

gkeishin commented 6 years ago

@AlexanderAmelkinWe opened it for debugging purpose and on discussion with @tomjoseph83 who fixed the same in the IPMI code https://gerrit.openbmc-project.xyz/#/c/9482/ and we closed this task.

Once they fix the code, we saw that existing the test code needing some more changes as well so, we track with other test task and commits

https://gerrit.openbmc-project.xyz/#/c/9875/ and https://github.com/openbmc/openbmc-test-automation/issues/1297

Hope this info helps.

AlexanderAmelkin commented 6 years ago

Thanks for pointing to https://gerrit.openbmc-project.xyz/#/c/9875/7 I believe this issue must be marked duplicate of #1318 that is reported as fixed by that gerrit commit.