History log of /openbmc/phosphor-logging/test/openpower-pels/event_logger_test.cpp (Results 1 – 2 of 2)
Revision Date Author Comments
# 104e9360 02-Apr-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Get new references to the event loop

In the EventLogger and Manager classes, have them acquire their own
references to the event loop as opposed to trying to get them from the
b

PEL: Get new references to the event loop

In the EventLogger and Manager classes, have them acquire their own
references to the event loop as opposed to trying to get them from the
bus object.

This is because lately in SDK based testcases, when sdbusplus tries to
create a new sd_bus object, the creation fails and so it isn't possible
to get an sd_event object out of it like the code was trying to do.

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

show more ...


# f682b40d 18-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
creat

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