- error_logging.[hc]pp
n DBusErrorLogging()
- logConfigFileError()
- Verify logs error of type xyz.openbmc_project.Power.Regulators.Error.ConfigFile
- Verify specified severity is used
- logDBusError()
- Verify logs error of type xyz.openbmc_project.Power.Error.DBus
- Verify specified severity is used
- logI2CError()
- Verify logs error of type xyz.openbmc_project.Power.Error.I2C
- Verify specified severity is used
- Verify bus stored in CALLOUT_IIC_BUS property correctly
- Verify address stored in CALLOUT_IIC_ADDR property correctly as hex string
- Verify errno value stored in CALLOUT_ERRNO property correctly
- logInternalError()
- Verify logs error of type xyz.openbmc_project.Power.Error.Internal
- Verify specified severity is used
- logPMBusError()
- Verify logs error of type xyz.openbmc_project.Power.Error.PMBus
- Verify specified severity is used
- Verify relative inventory path stored as absolute path in CALLOUT_INVENTORY_PATH property correctly
- logWriteVerificationError()
- Verify logs error of type xyz.openbmc_project.Power.Regulators.Error.WriteVerification
- Verify specified severity is used
- Verify relative inventory path stored as absolute path in CALLOUT_INVENTORY_PATH property correctly
- createFFDCFile()
- Verify resulting user-defined section fields
- Type Text
- SubType 0
- Version 0
- Test where various line cases
- vector has one line
- vector has multiple lines
- line is empty
- line is not empty: Contains only a newline
- line is not empty: Contains only one character
- line is not empty: Contains characters + newline
- line is not empty: Contains characters but no newline
- Writing lines to file
- Test where works
- Verify all data written to the file
- Test where all bytes written in one operation
- Test where takes multiple operations to finish the write
- Test where fails
- Test where works
- Seeking to beginning of file
- Test where works
- Test where fails
- Verify resulting user-defined section fields
- createFFDCFiles()
- Verify creates an FFDC file for each executable
- Test where messages vector is empty
- Test where messages vector is not empty
- Test where createFFDCFile() works
- Test where createFFDCFile() fails
- Verify error is written to the journal
- Verify continues to next executable
- createFFDCTuples()
- Test where vector of FFDCFile is empty
- Test where vector of FFDCFile is not empty
- Verify creates tuple with all 4 properties set correctly
- Verify that vector of FFDCTuple in same order as vector of FFDCFile
- getAbsoluteInventoryPath()
- Test where inventoryPath is empty
- Test where inventoryPath is not empty
- Test where relative path starts with '/'
- Test where relative path does not start with '/'
- Verify resulting absolute path is correct with proper prefix
- logError()
- Verify PID stored in _PID property
- Test where createFFDCFiles() works
- Test where zero FFDCFiles created
- Test where one FFDCFiles created
- Test where two FFDCFiles created
- Test where createFFDCFiles() fails
- Verify error is written to the journal
- Verify no error log created
- Verify FFDCTuples are created successfully
- Method call
- Test where works
- Verify parameters passed to method
- message
- severity
- additionalData
- FFDC tuples
- Verify parameters passed to method
- Test where fails
- Invalid service name
- Invalid object path
- Invalid interface name
- Invalid method name
- Test where works
- Verify FFDC files are removed
- When error logging was successfully created/no exception
- When error logging was not created/exception thrown
- removeFFDCFiles()
- Verify tries to remove all the FFDC files
- Test where works
- Test where fails
- Verify error written to journal
- Verify still removes the remaining files
- Verify tries to remove all the FFDC files
- logConfigFileError()
- mock_error_logging.hpp
- Verify a test case can use MockErrorLogging successfully
- logConfigFileError()
- logDBusError()
- logI2CError()
- logInternalError()
- logPMBusError()
- logWriteVerificationError()
- Verify that a base BMC error log entry is created
- Verify that a PEL is created
- Verify that each type of error is created successfully
- xyz.openbmc_project.Power.Regulators.Error.WriteVerification
- xyz.openbmc_project.Power.Regulators.Error.ConfigFile
- xyz.openbmc_project.Power.Error.Internal
- xyz.openbmc_project.Power.Error.I2C
- xyz.openbmc_project.Power.Error.PMBus
- xyz.openbmc_project.Power.Error.DBus
- Verify that created error logs have the expected data
- Property/field values
- Callouts with associated VPD (same VPD keywords stored for FSP errors)
- User Data sections containing debug data stored in FFDC files
- One section per file
- Data from message registry
- Verify 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).
- Verify that temporary FFDC files are removed
- When no errors occurred
- When errors occurred (exception throw)
- Notice, Informational, Debug
- nonError
- Warning
- predictive
- Critical
- critical
- Emergency, Alert, Error
- unrecoverable