| commit | 1df5954c68d96c938465909ce9cea45e2bf2e9d2 | [log] [tgz] |
|---|---|---|
| author | Shawn McCarney <shawnmm@us.ibm.com> | Thu Sep 24 18:43:18 2020 -0500 |
| committer | Shawn McCarney <shawnmm@us.ibm.com> | Wed Oct 07 15:04:44 2020 +0000 |
| tree | 9fb3af36113866912e1830915dc1c3e9057558ef | |
| parent | fed0ba29f7787112ce1ee214e53dea04590dc5ea [diff] |
regulators: Implement D-Bus error logging
Implemented the DBusErrorLogging class. This class creates error logs
using the D-Bus CreateWithFFDCFiles method.
Updated the abstract base class, ErrorLogging, to have the correct
virtual method parameters. The methods were previously defined with no
parameters as a temporary measure.
Also updated the MockErrorLogging class to have the correct virtual
method parameters.
Tested:
* Verified that all the log*Error() methods create an error log of the
correct type.
* Verified that created error logs have the expected:
* property/field values
* callouts with associated VPD
* User Data sections containing debug data stored in FFDC files
* Tested where creating an FFDC file fails.
* Tested where calling CreateWithFFDCFiles method fails.
* Tested where removing an FFDC file fails.
* Verified that if a failure occurs, it is written to the system
journal but does not result in a second error log (since that could
lead to an infinite loop).
* Verified that temporary FFDC files are removed even if creating the
error log fails.
Full Test Plan:
* https://gist.github.com/smccarney/60ecbc018c55a5d13661bda8ee256d61
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I2837fc68dfbad2d89193a147222f1c51d9b1aad3
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069//sys/bus/i2c/devices/3-0069/hwmon/hwmonX//sys/kernel/debug/pmbus/hwmonX//sys/kernel/debug/pmbus/hwmonX/cffps1/fruConfigs defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number attribute file from a directory specified by the above pmbus access type, and assign to PartNumber property in xyz.openbmc_project.Inventory.Decorator.Asset interface. "fruConfigs": [
{
"propertyName": "PartNumber",
"fileName": "part_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
}
]
psuDevices defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0's device is located in /sys/bus/i2c/devices/3-0069. "psuDevices": {
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069",
}