History log of /openbmc/pldm/common/test/pldm_utils_test.cpp (Results 1 – 15 of 15)
Revision Date Author Comments
# 5d86cdfb 20-Aug-2024 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

clang-tidy: Enable bugprone-string-literal-with-embedded-nul check

This check finds occurrences of string literal with embedded NUL
character and validates their usage.
The check is ignored on the l

clang-tidy: Enable bugprone-string-literal-with-embedded-nul check

This check finds occurrences of string literal with embedded NUL
character and validates their usage.
The check is ignored on the line because the test case has a
requirement to verify if the NUL terminator is removed or not
by the method.

Change-Id: I919bfed7d9c0b3a43933621bda32cd31c876ff02
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>

show more ...


# a34a64bb 30-Mar-2022 Thu Nguyen <thu@os.amperecomputing.com>

Support numeric effecters in dbus-to-host-effecter

Adds support of the numeric effecter PDR (section `28.11 Numeric
Effecter PDR` DSP0248 V1.3.0) type in dbus-to-host-effecter handler.
This handler

Support numeric effecters in dbus-to-host-effecter

Adds support of the numeric effecter PDR (section `28.11 Numeric
Effecter PDR` DSP0248 V1.3.0) type in dbus-to-host-effecter handler.
This handler will be applied for all PLDM termini but not only host.
The setting for one numeric effecter of one device can be:
{
"mctp_eid": 20,
"effecter_info": {
"effecterPdrType": 9,
"effecterID": 2,
"entityType": 32903,
"entityInstance": 2,
"containerID": 2,
"compositeEffecterCount": 1,
"checkHostState": false
},
"effecters": [
{
"dbus_info": {
"object_path": "/xyz/openbmc_project/sensors/power/A",
"interface": "xyz.openbmc_project.Sensor.Value",
"property_name": "Value",
"property_type": "double"
},
"effecterDataSize": 5,
"resolution": 1,
"offset": 0,
"unitModifier": 0
}
]
}

Where:
+ effecterPdrType to difference state/numeric effecter type. Default
is state effecter.
+ effecterID should be effecter ID and should not empty.
+ checkHostState can be set to false to bypass checking host state.
+ effecterDataSize, resolution, offset, unitModifier are from numeric
effecter PDR (section `28.11 Numeric Effecter PDR` DSP0248 V1.3.0)

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I438d7f204643edd4066e8a6ba28d53a97503fc4b

show more ...


# 16c2a0a0 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I8c84201cb2343a8c8a5507a49de0721a1bee7063
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 5a945bd1 01-Aug-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pldm: Move off pldm_pdr_add_check()

Generated with:

```
$ CLANG_VERSION=18 ./subprojects/libpldm/scripts/apply-renames ./subprojects/libpldm/evolutions/current/pldm_pdr_add_check.yaml
```

Change-I

pldm: Move off pldm_pdr_add_check()

Generated with:

```
$ CLANG_VERSION=18 ./subprojects/libpldm/scripts/apply-renames ./subprojects/libpldm/evolutions/current/pldm_pdr_add_check.yaml
```

Change-Id: I4982195e97c25567b35f77ee7dcf795629d259b4
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# b8cf46b8 14-Jun-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform-mc: Terminus name handling

`PLDM-stack: Adding sensor monitoring section` design spec details that
the `Terminus name` is required to create the terminus's sensors,
states, effecters... D-B

platform-mc: Terminus name handling

`PLDM-stack: Adding sensor monitoring section` design spec details that
the `Terminus name` is required to create the terminus's sensors,
states, effecters... D-Bus interfaces and `Terminus Name` can be
encoded in the Terminus's `Entity Auxiliary Names PDR` or in the MCTP
Entity-manager endpoint EID configuration file.
[1] https://gerrit.openbmc.org/c/openbmc/docs/+/47252/34/designs/pldm-stack.md#433

Section `28.18 Entity Auxiliary Names PDR` in DSP0248 V1.2.2 details
about the PDRs response for the name of one PLDM entity. When the
containerID is `0x0000` this entity is `Overall system` or `top most
containing entity`. The name of this entity will can be used as
`Terminus name`.

Support parsing `Entity Auxiliary Names PDR` and find the `Terminus
name` if it is reponsed in the terminus' PDRs. `Terminus Name` string
will be assigned to local variable and can be used as prefix for
sensors, state, effecters... names.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I701537c48651b9de86de77941b752e30de112916

show more ...


# 6c7fed4c 22-Feb-2022 Gilbert Chen <gilbert.chen@arm.com>

platform-mc: Added Terminus/TerminusManager class

Added requester::sendRecvPldmMsg awaiter type to be able to send and
receive PLDM message by coroutine.
Added TerminusManager to discover terminus f

platform-mc: Added Terminus/TerminusManager class

Added requester::sendRecvPldmMsg awaiter type to be able to send and
receive PLDM message by coroutine.
Added TerminusManager to discover terminus from EID list updated by
MCTPDiscovery class. The TerminusManager will initialize TID.

Signed-off-by: Gilbert Chen <gilbert.chen@arm.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: Ifa5bdfff50648f1d7fba8710e160de662e8f9e06

show more ...


# cd4cd457 22-Apr-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

common: Improve printBuffer() & added unit tests

This patchset is improved version of the existing code for several
reasons:

1.The code is more concise and easier to read. It uses modern C++
featur

common: Improve printBuffer() & added unit tests

This patchset is improved version of the existing code for several
reasons:

1.The code is more concise and easier to read. It uses modern C++
features such as `std::ranges::for_each` and `std::format`, which
express the intent of the code more clearly compared to the nested
if-else statements and manual formatting.

2.The code now has fewer lines of code and avoids the need for creating
and managing an `std::ostringstream` object manually, which simplifies
the function and reduces the risk of errors.

3.This patch uses type-safe range-based for loop and `uint8_t` type
directly, whereas the existing code uses `int` for iterating over the
buffer elements, which may lead to unintentional type conversions or
loss of precision.

4.While the performance impact may not be significant for this patch,
using `std::ranges::for_each` with lambdas might allow for more
optimization opportunities by the compiler compared to the traditional
loop used in existing code.

Overall, this patchset leverages modern C++ features to achieve the same
functionality in a more concise, readable, and type-safe manner, making
it preferable.

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

show more ...


# 754041d0 20-Feb-2024 Riya Dixit <riyadixitagra@gmail.com>

utils: Retrieval of managed objects of DBUS

This commit implements functionality to retrieve the managed object of a
specific DBUS service on a particular path. Additionally implements a
function t

utils: Retrieval of managed objects of DBUS

This commit implements functionality to retrieve the managed object of a
specific DBUS service on a particular path. Additionally implements a
function template for inventory objects which efficiently enables
retrieval of managed object for Inventory Manager.

Tested: Added unit test cases for checking the return value.

Change-Id: Ide652f843db1623bdacebf3e269e03895bbb7f1a
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# 64f37feb 03-Jul-2023 Andrew Jeffery <andrew@aj.id.au>

pldmd: Migrate to pldm_pdr_add_check()

pldm_pdr_add() is deprecated in libpldm as it uses assert() to
communicate to the caller that an error occurred. pldm_pdr_add_check()
instead returns a value t

pldmd: Migrate to pldm_pdr_add_check()

pldm_pdr_add() is deprecated in libpldm as it uses assert() to
communicate to the caller that an error occurred. pldm_pdr_add_check()
instead returns a value that indicates success or failure.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Icca92fd742f07fb935202a9d9e62f5648916b12b

show more ...


# c453e164 21-Dec-2022 George Liu <liuxiwei@inspur.com>

libpldm: Correct reference to libpldm header files

When relying on header files from external libraries, #include<> should
be used instead of #include "" to avoid ambiguity.

Tested: Built pldm succ

libpldm: Correct reference to libpldm header files

When relying on header files from external libraries, #include<> should
be used instead of #include "" to avoid ambiguity.

Tested: Built pldm successfully after enabling ibm-oem

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

show more ...


# 3ca40453 04-Oct-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Remove PDR's based on Terminus Handle

The current pldm infrastructure is written in way that
it deletes all the PDR's which are marked as "remote",when
we get a PDR refresh entire repository signal

Remove PDR's based on Terminus Handle

The current pldm infrastructure is written in way that
it deletes all the PDR's which are marked as "remote",when
we get a PDR refresh entire repository signal comes from remote
PLDM terminus,this does not work in muti-host scenario where BMC
talks to more than one HOST that talks pldm.

When a repository refresh signal comes form a remote PLDM terminus,
BMC is supposed to only delete the PDR's corresponding to the same
PLDM terminus.

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

show more ...


# ca1998f3 06-Jun-2022 Manojkiran Eda <manojkiran.eda@gmail.com>

update clang-format

This commit would update the repo's clang-format file to
the latest of docs/style/cpp/clang-format file.

Following is the new change that is added:
Brad :
clang-format: cpp: r

update clang-format

This commit would update the repo's clang-format file to
the latest of docs/style/cpp/clang-format file.

Following is the new change that is added:
Brad :
clang-format: cpp: remove empty lines

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

show more ...


# 872f0f69 25-Nov-2021 George Liu <liuxiwei@inspur.com>

utils: Add split method

Add the method of splitting the string, split the string according to
the special identifier and return a vector.

Tested: Add Unit Test and test passes.

Signed-off-by: Geor

utils: Add split method

Add the method of splitting the string, split the string according to
the special identifier and return a vector.

Tested: Add Unit Test and test passes.

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

show more ...


# 5492207a 19-Jun-2021 Tom Joseph <rushtotom@gmail.com>

common: Add helper function toString

Add helper function to convert variable_field to std::string.

Tested: Unit tests passed

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

common: Add helper function toString

Add helper function to convert variable_field to std::string.

Tested: Unit tests passed

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

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 respective dire

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 ...