History log of /openbmc/phosphor-logging/test/ (Results 176 – 200 of 290)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ed04685613-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Create SRC FRU callout for inventory path

When a BMC application creates an event log with the
CALLOUT_INVENTORY_PATH=<FRU inventory path> entry in the AdditionalData
property, create a FRU cal

PEL: Create SRC FRU callout for inventory path

When a BMC application creates an event log with the
CALLOUT_INVENTORY_PATH=<FRU inventory path> entry in the AdditionalData
property, create a FRU callout section for that FRU in the SRC.

Obtain the location code, part number, serial number, and CCIN VPD
keyword for that FRU to add to the callout. If these aren't available,
as detected by catching an sdbusplus exception, create a callout with a
'no VPD for FRU' maintenance procedure instead.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0d6680d87c325703df9e2a6d2e2715b18498fabc

show more ...

60c4e79713-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Collect information for a FRU callout

Add an API to the DataInterface class to collect the following fields
needed to add a FRU callout to a PEL:
* Location code
* FRU part number (The VINI/FN

PEL: Collect information for a FRU callout

Add an API to the DataInterface class to collect the following fields
needed to add a FRU callout to a PEL:
* Location code
* FRU part number (The VINI/FN keyword)
* FRU CCIN (The VINI/CC keyword)
* FRU serial number (The VINI/SN keyword)

For now, this code requires that both of the 2 D-Bus interfaces that
contain these properties be present on the inventory path being passed
in. In the future, some smarts may need to be added to the code for
cases when the path isn't a FRU itself, or maybe doesn't have its own
VPD. It's also possible there will be community supplied code in the
future that could do this mapping, which is why this code isn't trying
to do it itself now.

In the cases where one or both of these interfaces don't exist, an
exception will be thrown by the underlying sdbusplus code, and the
caller of this will handle it appropriately.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8eb5752fa25fc0e2107df3c7145355bbb4f12cf4

show more ...

e0366f3113-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Let Callouts class have a Callout added

Add an addCallout() function to the Callouts class to add a new Callout
object to it.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib2a35

PEL: Let Callouts class have a Callout added

Add an addCallout() function to the Callouts class to add a new Callout
object to it.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib2a352b3b10e2948c4e847d29a456b8de9cb3559

show more ...

0a5d10ce13-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add Callout object constructors

Add constructors to the PEL Callout object to create a FRU callout,
either a hardware FRU with PN/SN/CCIN, or a maintenance procedure.

Signed-off-by: Matt Spinl

PEL: Add Callout object constructors

Add constructors to the PEL Callout object to create a FRU callout,
either a hardware FRU with PN/SN/CCIN, or a maintenance procedure.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I015370fbfa4e5522eada316d12c10b130e1de4be

show more ...

ba0ee00213-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Create FRUIdentity with FRUs/procedures

Add constructors to the FRUIdentity structure in the SRC section to take
either a hardware callout with PN/SN/CCIN, or a maintenance procedure
callout wi

PEL: Create FRUIdentity with FRUs/procedures

Add constructors to the FRUIdentity structure in the SRC section to take
either a hardware callout with PN/SN/CCIN, or a maintenance procedure
callout with a maintenance procedure enum. Both of these also take
callout priority.

These will be used when creating PELs that have callouts.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5071d98df38b63ba53224c3f3b853e57234ed74e

show more ...

578e070f13-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Maintenance procedure callout definitions

A maintenance procedure is a short string that resides in the FRU
identity structure in the SRC section of a PEL that maps to a service
procedure in th

PEL: Maintenance procedure callout definitions

A maintenance procedure is a short string that resides in the FRU
identity structure in the SRC section of a PEL that maps to a service
procedure in the service documentation.

This commit adds the initial framework for dealing with these by adding
an enum type to specify them, and a pel_values.hpp function to get the
actual string value of the maintenance procedure based on its enum.

A single procedure is created in this commit, NoVPDforFRU, which will
be used in a future commit when the location code, part number, etc,
aren't available when trying to do a callout and so this procedure will
be used instead.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I45f366e98794462c70d851f743e4f497c0af77b4

show more ...

bebeb94812-Mar-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: peltool: Add const strings for section header

Added "Section Version", "Sub-section type" and "Created by" constant strings.

Updated all getJSON() functions to use the new constants.

Signed-o

PEL: peltool: Add const strings for section header

Added "Section Version", "Sub-section type" and "Created by" constant strings.

Updated all getJSON() functions to use the new constants.

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I434192afed929972845c3cfb8876cc5ef784eec2

show more ...

a44efe4803-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Common function to call host iface response

Add a function to the HostInterface class to invoke the user defined
command response function if there is one, and then change the code to
use this

PEL: Common function to call host iface response

Add a function to the HostInterface class to invoke the user defined
command response function if there is one, and then change the code to
use this new function.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia376923df70863bcd46120cf23918c2f255f984f

show more ...

075e5baf21-Feb-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Save the motherboard CCIN in the SRC

The CCIN field is from the CC keyword of the VINI record in the
motherboard VPD.

Save it in the first half of the second hex word of the SRC.

Also print t

PEL: Save the motherboard CCIN in the SRC

The CCIN field is from the CC keyword of the VINI record in the
motherboard VPD.

Save it in the first half of the second hex word of the SRC.

Also print this field when displaying the SRC section, but only for SRCs
created by this code, which it knows by checking the first 2 characters
of the ASCII string.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I25f94f7fbcfd3212adf28c357e55271ea9269add

show more ...

4aa23a1f03-Feb-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add 3 state fields to PEL UserData section

Add the following to the system info UserData section that gets added
for PELs created by BMC code:

* CurrentBMCState on /xyz/openbmc_project/state/b

PEL: Add 3 state fields to PEL UserData section

Add the following to the system info UserData section that gets added
for PELs created by BMC code:

* CurrentBMCState on /xyz/openbmc_project/state/bmc0
* CurrentHostState on /xyz/openbmc_project/state/host0
* CurrentPowerState on /xyz/openbmc_project/state/chassis0

The RequestedPowerTransition property is also read along with the
CurrentPowerState property since it's on the same interface and will
be used in a future commit.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Icdc225f2c9bb6d91e67a4cbe608df97803ccee6c

show more ...

24a8558b27-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Don't send PELs to host when flag disabled

Don't put any PELs on the queue to send to the host when the setting to
send event logs to the host has been set to false.

Signed-off-by: Matt Spinle

PEL: Don't send PELs to host when flag disabled

Don't put any PELs on the queue to send to the host when the setting to
send event logs to the host has been set to false.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I37be53f54c354e2c440ac3a932630a4905e311f1

show more ...

19e7290124-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add PELs from ESELs

When the OpenPower host firmware subsystem hostboot creates PELs, those
PELs get added to OpenBMC event logs in the ESEL entry of the
AdditionalData property. (Eventually h

PEL: Add PELs from ESELs

When the OpenPower host firmware subsystem hostboot creates PELs, those
PELs get added to OpenBMC event logs in the ESEL entry of the
AdditionalData property. (Eventually hostboot will update their code to
use PLDM to send down PELs.)

This commit looks for that ESEL keyword on incoming event logs, extracts
the PEL data, and adds it to the PEL repository with all of the other
PELs.

It extracts the PEL data by converting the string value to a vector of
uint8_ts starting after the IPMI data fields contained in that string.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2b7f2915dceb9c306466b8181cae05a3ddd65057

show more ...

e95fd01507-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: New event log when receiving bad host PEL

Create a new event log/PEL when a PEL comes in from the host but it
isn't valid.

The PEL subsystem used is 'platform firmware' because the code won't

PEL: New event log when receiving bad host PEL

Create a new event log/PEL when a PEL comes in from the host but it
isn't valid.

The PEL subsystem used is 'platform firmware' because the code won't
know which specific host subsystem it came from. The severity is
unrecoverable as opposed to informational to make it easier to notice.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I933e5c82f1ef755c6266604fbdec6d0c1fe5b784

show more ...

05c2c6c418-Dec-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Create error log for 'bad PEL'

Create an event log (and a PEL) for the case when the host rejects a PEL
because it is malformed. This requires a new message registry entry for
the error.

Sign

PEL: Create error log for 'bad PEL'

Create an event log (and a PEL) for the case when the host rejects a PEL
because it is malformed. This requires a new message registry entry for
the error.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ibd52921b5d6020f98b457b9ee0b3bb4f0b95e707

show more ...

f682b40d18-Dec-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add ability to create event logs

There are cases where the PEL code wants to be able to create OpenBMC
event logs (and thus PELs) for problems it encounters when trying to
create or import othe

PEL: Add ability to create event logs

There are cases where the PEL code wants to be able to create OpenBMC
event logs (and thus PELs) for problems it encounters when trying to
create or import other PELs. For example, if the host were to send down
a malformed PEL, this code would like to create a new event log and
capture part of that bad PEL in the new PEL for debug purposes, as the
malformed PEL cannot be reported anywhere since it is malformed.

To handle this, create the EventLogger class that provides a log()
function that allows the PEL extension code to create OpenBMC event logs
(and thus PELs) from within.

The underlying function to do the event log creating is passed in via
the constructor so that it can be changed for testing.

The sd_event_add_defer function (wrapped by sdeventplus) is used to
dispatch the creation of a single event, so that the entry point is from
the event loop. If there are still events left on the queue after that,
then they will be also be scheduled with sd_event_add_defer so that the
events are always created from event loop calls.

EventLogger does not allow events to be added to the queue if it is
being done from within the creation function so that the code can't
get stuck in a loop of creating a new event every time an event is
created.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6a9062074dc62cfb6043139ff0a9f3dfcd06c708

show more ...

7ae2fa6918-Dec-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Allow adding to AdditionalData

Add an interface to add a key/value pair to the data stored in
the AdditionalData class. Also add an interface to get to the
raw underlying map of data.

Signed-

PEL: Allow adding to AdditionalData

Add an interface to add a key/value pair to the data stored in
the AdditionalData class. Also add an interface to get to the
raw underlying map of data.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I61200f92b45be8e86992d3f4888698d6a5bbe251

show more ...

6aae6a0c07-Feb-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Increase host full timeout val in test

The host notifier testcase depends on catching the host full retry timer
after it starts but before it trips. Occasionally in CI when a lot of
of work i

PEL: Increase host full timeout val in test

The host notifier testcase depends on catching the host full retry timer
after it starts but before it trips. Occasionally in CI when a lot of
of work is being done in parallel this wasn't happening so the testcase
would fail. Increase the timeout value from 20ms to 400ms which is
hopefully enough.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id8d1c7a800f9da932d85da7ed3bf6d6e5400a24e

show more ...

ce3f450b22-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add Section::getJSON() implementer test

Test that the PEL section classes that provide a getJSON()
implementation return valid JSON.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id:

PEL: Add Section::getJSON() implementer test

Test that the PEL section classes that provide a getJSON()
implementation return valid JSON.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I10dc6bbd0e1e4d63e6416928e9951ac6f85ba774

show more ...

e2d1bf3106-Feb-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: Print Failing MTMS section into JSON

Remove any trailing whitespace for serial number.

"Failing MTMS": {
"Section Version": "1",
"Sub-section type": "0",
"Created

PEL: Print Failing MTMS section into JSON

Remove any trailing whitespace for serial number.

"Failing MTMS": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x4552",
"Machine Type Model": "OPWR-131",
"Serial Number": "1318ABA"
},

Testing: Manually run peltool and verified output. All unit tests
passed.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I7a05790bdf406ef6d7946ffae831a45ee6dd5cda

show more ...

6fd0c1e706-Feb-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: Add SRC::getErrorDetails() unit test

Tests the registry message string placeholder substitution

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: If89609a911403a76bd6044f

PEL: Add SRC::getErrorDetails() unit test

Tests the registry message string placeholder substitution

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: If89609a911403a76bd6044f81e0f464e38aec8f2

show more ...

0f717e1015-Jan-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: Print SRC section into JSON

For BMC created errors, look up the reason code in
the message registry for error description and also
meaning of data stored in hexwords 6-9 (if any).

Added regist

PEL: Print SRC section into JSON

For BMC created errors, look up the reason code in
the message registry for error description and also
meaning of data stored in hexwords 6-9 (if any).

Added registry message field in peltool list output.

"Primary SRC": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "0x1000",
"SRC Version": "0x02",
"SRC Format": "0x55",
"Power Control Net Fault": "False",
"Error Details": {
"Message": "PS 0x64 had a PGOOD Fault",
"PS_NUM": "0x64"
},
"Valid Word Count": "0x09",
"Reference Code": "BD8D1001",
"Hex Word 2": "00000055",
"Hex Word 3": "00000010",
"Hex Word 4": "00000000",
"Hex Word 5": "00000000",
"Hex Word 6": "00000064",
"Hex Word 7": "00000000",
"Hex Word 8": "00000000",
"Hex Word 9": "00000000"
}

"Primary SRC": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x4552",
"SRC Version": "0x02",
"SRC Format": "0x2008000",
"Power Control Net Fault": "False",
"Valid Word Count": "0x04",
"Reference Code": "B2001020",
"Hex Word 2": "02008000",
"Hex Word 3": "00000000",
"Hex Word 4": "00000012",
"Callout Section": {
"Callout Count": "1",
"Callouts": [{
"FRU Type": "Symbolic FRU",
"Priority": "Medium Priority",
"Part Number": "NEXTLVL"
}]
}
}

Testing: Manually run peltool and verified out. All unit tests passed.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I124627ba785413ebda02305b7d9f95431922e714

show more ...

56e0826327-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: HostNotifier testcase refactoring

This commit doesn't change the behavior, it just makes the following
changes to the testcase infrastructure so there is less duplication:

* Move the hostIface

PEL: HostNotifier testcase refactoring

This commit doesn't change the behavior, it just makes the following
changes to the testcase infrastructure so there is less duplication:

* Move the hostIface, mockHostIface, repo, and dataIface instances into
the test class HostNotifierTest so that all testcases can use them,
and then remove creating them in every testcase.

* MockHostIface is now a pointer, so have to change its use.

* Make the DataInterface and HosttInterface mocks be NiceMocks so that
gtest won't print warnings about functions called that don't have
EXPECT_CALLs.

* Have the default behavior of sendNewLogCmd be to send a command
successfully so that it doesn't have to be specified in every
testcase.

Change-Id: Ic393933629753b884299ee4dfa30a8bb6007ee63

show more ...

677381b823-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Save BMC Version ID in UserData section

When creating a PEL, save the VERSION_ID value from the /etc/os-release
file in the UserData section that keeps useful system information.

Signed-off-by

PEL: Save BMC Version ID in UserData section

When creating a PEL, save the VERSION_ID value from the /etc/os-release
file in the UserData section that keeps useful system information.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6d9008b15c5347239bf8c21ef79219d3b6ee08e6

show more ...

4dcd3f4622-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Save process name in a UserData section

When creating a new PEL, add a UserData section that contains various
pieces of system information that will be saved in every error log.

In this first

PEL: Save process name in a UserData section

When creating a new PEL, add a UserData section that contains various
pieces of system information that will be saved in every error log.

In this first commit, just save the process name of the creator,
provided they passed in the '_PID' AdditionalData item containing their
PID.

Future commits will add other items like certain D-Bus properties.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7139b4056e494277ff3388bfa8a00002c9c89dc1

show more ...

f1b46ff422-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add function to get PEL size

Add a size() function to the PEL class that adds up the size fields
in the header of every PEL section.

This required a fix to some testcases where the size field

PEL: Add function to get PEL size

Add a size() function to the PEL class that adds up the size fields
in the header of every PEL section.

This required a fix to some testcases where the size field was wrong in
a header.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0d70deae116cd3835f2c0ab34e13811da471fb14

show more ...

12345678910>>...12