History log of /openbmc/pldm/libpldmresponder/test/libpldmresponder_fru_test.cpp (Results 1 – 8 of 8)
Revision Date Author Comments
# a881c170 21-Jun-2021 George Liu <liuxiwei@inspur.com>

Reduce multiple oem_ibm entry points in pldmd

Abstract the custom method of `OEM-IBM` into the oem-ibm.hpp file
to prevent the continuous increase of custom code and reduce multiple
`OEM-IBM` entry

Reduce multiple oem_ibm entry points in pldmd

Abstract the custom method of `OEM-IBM` into the oem-ibm.hpp file
to prevent the continuous increase of custom code and reduce multiple
`OEM-IBM` entry points in pldmd.

Tested: enabled oem-ibm and built pldm successfully.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ieddb8d12281553e70bdb1c333bd29425c9d14fb0

show more ...


# a410c658 22-Jul-2021 Pavithra Barithaya <pavithra.b@ibm.com>

oem:ibm :Implement SetFruRecordTable

The commit implements the setFruRecordTable command
and also updates the DBus property for the IBM cable cards
for which the host sends a setFruRecordTable comma

oem:ibm :Implement SetFruRecordTable

The commit implements the setFruRecordTable command
and also updates the DBus property for the IBM cable cards
for which the host sends a setFruRecordTable command.

Tested: using pldmtool

Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
Change-Id: I70e4f85f627577d8ca1bc90447b10e9e2e8e7ccd

show more ...


# 19fdb45b 23-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

libpldmresponder: Make FRU tests load a valid FRU config

FRU_MASTER_JSON yields a value such as
"/usr/local/share/pldm/fru_master.json" which is is not likely to exist
on a on developer's system.

F

libpldmresponder: Make FRU tests load a valid FRU config

FRU_MASTER_JSON yields a value such as
"/usr/local/share/pldm/fru_master.json" which is is not likely to exist
on a on developer's system.

Fix this by replacing use of FRU_MASTER_JSON in the newer test cases
with the fixed, relative path used in the existing test case.

Fixes: 5bfb0dcbbd39 ("Refactor buildFRUTable and update to Association tree")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Id57fea5a3e9d4dc48d8abff9f6e75aef77e5cc6b

show more ...


# 32403435 23-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

libpldmresponder: Use ASSERT_TRUE() to prevent NULL pointer deref

EXPECT_TRUE() logs a failure of the condition but allows execution to
continue. From the gtest documentation:

> The majority of the

libpldmresponder: Use ASSERT_TRUE() to prevent NULL pointer deref

EXPECT_TRUE() logs a failure of the condition but allows execution to
continue. From the gtest documentation:

> The majority of the macros listed below come as a pair with an EXPECT_
> variant and an ASSERT_ variant. Upon failure, EXPECT_ macros generate
> nonfatal failures and allow the current function to continue running,
> while ASSERT_ macros generate fatal failures and abort the current
> function.

https://google.github.io/googletest/reference/assertions.html

Fixes: 5bfb0dcbbd39 ("Refactor buildFRUTable and update to Association tree")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I226fe8302acaef74be2ef88aaff8de7898a6e862

show more ...


# 5bfb0dcb 01-May-2021 George Liu <liuxiwei@inspur.com>

Refactor buildFRUTable and update to Association tree

The previous logic is to obtain the entity of the parent by parsing
the DBus object path. If the obtaining fails it skipped the current
entity
t

Refactor buildFRUTable and update to Association tree

The previous logic is to obtain the entity of the parent by parsing
the DBus object path. If the obtaining fails it skipped the current
entity
type and continued to obtain the entity of the next parent.

In this commit the code is optimised to not skip the current entity
type.

The intent behind this commit is to refactor the buildFRUTable
method and their pldm entities need to be created in turn according
to the object path and update the association tree.

Tested:
There is one CPU, one DIMM, two powersupplies on my system
~# pldmtool platform getpdr -d 6
{
"nextRecordHandle": 7,
"responseCount": 26,
"recordHandle": 6,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 16,
"containerID": 1,
"associationType": "Physical",
"containerEntityType": "System (logical)",
"containerEntityInstanceNumber": 1,
"containerEntityContainerID": 0,
"containedEntityCount": 1,
"containedEntityType[1]": "System chassis (main enclosure)",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 1
}

~# pldmtool platform getpdr -d 7
{
"nextRecordHandle": 8,
"responseCount": 26,
"recordHandle": 7,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 16,
"containerID": 2,
"associationType": "Physical",
"containerEntityType": "System chassis (main enclosure)",
"containerEntityInstanceNumber": 1,
"containerEntityContainerID": 1,
"containedEntityCount": 1,
"containedEntityType[1]": "System Board",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 2
}

~# pldmtool platform getpdr -d 8
{
"nextRecordHandle": 9,
"responseCount": 44,
"recordHandle": 8,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 34,
"containerID": 3,
"associationType": "Physical",
"containerEntityType": "System Board",
"containerEntityInstanceNumber": 1,
"containerEntityContainerID": 2,
"containedEntityCount": 4,
"containedEntityType[1]": "Processor",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 3,
"containedEntityType[2]": "Memory chip",
"containedEntityInstanceNumber[2]": 1,
"containedEntityContainerID[2]": 3,
"containedEntityType[3]": "Power Supply",
"containedEntityInstanceNumber[3]": 1,
"containedEntityContainerID[3]": 3,
"containedEntityType[4]": "Power Supply",
"containedEntityInstanceNumber[4]": 2,
"containedEntityContainerID[4]": 3
}

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie375ea448d850450101c85fa818498db0b67cc1f

show more ...


# 03b01ca8 28-Jun-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Add support for vendor specific FruDbusLookup

In the current state, a vendor could not define the FRU's
that he wants to send to the host.

This commit adds a fru_master.json tha

Add support for vendor specific FruDbusLookup

In the current state, a vendor could not define the FRU's
that he wants to send to the host.

This commit adds a fru_master.json that can be used while
building the master , and the json would be replaced with
fru_master.json from the oem/<vendor>/configurations
directory when compiling for oem's.

Tested By:

IBM machine test :
1. meson build -Doem-ibm=enabled -Dprefix=<>
2. ninja -C build && ninja install
3. in the prefix directory we should see the json file
from the oem/ibm/configurations folder

Non IBM machine test :
1. meson build -Doem-ibm=disabled -Dprefix=<>
2. ninja -C build && ninja install
3. in the prefix directory we should see the json file
from the pldm/configurations folder.

Runtime test:
1. on an IBM machine make sure the pldm builds the fru record
table.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Id3c2746c51a1f99f2038b2af48137133e9d0b405

show more ...


# a137f903 04-Jun-2021 Jayashankar Padath <jayashankar.padath@in.ibm.com>

fru: Add new inventory items in the fru parser

Add new inventory items to the FRU list like Drive backplane,
Card, Fan, Battery, Connector and Slot. This generates new
FRU Record Set

fru: Add new inventory items in the fru parser

Add new inventory items to the FRU list like Drive backplane,
Card, Fan, Battery, Connector and Slot. This generates new
FRU Record Set PDRs and Entity Association PDRs and updates
the existing ones.

Test Results:

1. RTC FRU Record Set PDR o/p

pldmtool platform GetPDR -d 23
{
"nextRecordHandle": 24,
"responseCount": 20,
"recordHandle": 23,
"PDRHeaderVersion": 1,
"PDRType": "FRU Record Set PDR",
"recordChangeNumber": 0,
"dataLength": 10,
"PLDMTerminusHandle": 0,
"FRURecordSetIdentifier": 23,
"entityType": "Battery",
"entityInstanceNumber": 1,
"containerID": 3
}

2. Entity Association PDR for Card

pldmtool platform GetPDR -d 33
{
"nextRecordHandle": 34,
"responseCount": 32,
"recordHandle": 33,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 22,
"containerID": 7,
"associationType": "Physical",
"containerEntityType": "Card",
"containerEntityInstanceNumber": 3,
"containerEntityContainerID": 3,
"containedEntityCount": 2,
"containedEntityType[1]": "Connector",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 7,
"containedEntityType[2]": "Connector",
"containedEntityInstanceNumber[2]": 2,
"containedEntityContainerID[2]": 7
}

Signed-off-by: Jayashankar Padath <jayashankar.padath@in.ibm.com>
Change-Id: I66aff87f00aa9eb17ea845a71710253cea7c6d83

show more ...


# 5327988e 28-Apr-2021 Tom Joseph <rushtotom@gmail.com>

tests: Organize the test code to make it modular

The unit test code for libpldmresponder, host-bmc and common is
in a shared test directory. This patch separates the test code
to the

tests: Organize the test code to make it modular

The unit test code for libpldmresponder, host-bmc and common is
in a shared test directory. This patch separates the test code
to the respective directory.

Tested: Ran the unit test and tests passed.

Signed-off-by: Tom Joseph <rushtotom@gmail.com>
Change-Id: I31d53681fa6c0d8bc6eb7c4e3341aaff4bc341ee

show more ...