History log of /openbmc/phosphor-power/phosphor-power-sequencer/test/mock_services.hpp (Results 1 – 4 of 4)
Revision Date Author Comments
# 3a11d632 23-May-2024 Shawn McCarney <shawnmm@us.ibm.com>

pseq: Add BMC dump method to Services class

Add a method to the Services class to create a BMC dump.

Tested:
* Delete all BMC dumps on system
* Verify no BMC dumps exist
* Call method to create a B

pseq: Add BMC dump method to Services class

Add a method to the Services class to create a BMC dump.

Tested:
* Delete all BMC dumps on system
* Verify no BMC dumps exist
* Call method to create a BMC dump
* Verify dump is created
* Expand dump
* Verify dump has expected contents
* Call method to create a BMC dump again
* Verify a second dump is created

Change-Id: Ia4b9753e9ba15ed61bf5446006713875e738b3dd
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# 24956598 19-Feb-2024 Shawn McCarney <shawnmm@us.ibm.com>

pseq: Add pgood fault detection to Rail class

Add power good (pgood) fault detection to the Rail class in the
phosphor-power-sequencer application.

Implement the checking defined in the JSON config

pseq: Add pgood fault detection to Rail class

Add power good (pgood) fault detection to the Rail class in the
phosphor-power-sequencer application.

Implement the checking defined in the JSON configuration file:
* Check for fault bits set in STATUS_VOUT
* Check for a GPIO with the wrong value
* Check if the output voltage (READ_VOUT) is below the undervoltage
limit (VOUT_UV_FAULT_LIMIT)

If a pgood fault is detected, capture the relevant debug information
such as the rail name and STATUS_WORD value.

Tested:
* Added gtests for the new code
* Ran all gtests and verified they passed

Change-Id: I09c3ed6c504fe907a7854a4ac462a2bc4a8b806f
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# e4fef0fc 05-Apr-2024 Shawn McCarney <shawnmm@us.ibm.com>

pseq: Add presence caching to Services

Add caching of hardware presence data to the Services class in the
phosphor-power-sequencer application. Obtaining hardware presence from
D-Bus is a slow oper

pseq: Add presence caching to Services

Add caching of hardware presence data to the Services class in the
phosphor-power-sequencer application. Obtaining hardware presence from
D-Bus is a slow operation. During pgood fault isolation, multiple rails
may need the same hardware presence information. Cache this information
to improve performance.

Provide a method to clear the cached data since it is only valid for a
short period of time. For example, power supplies are hot-pluggable, so
their presence may change while a system is powered on.

Tested:
* BMCServices
* createPMBus()
* Verify correct sysfs path passed to PMBus constructor
* isPresent()
* Test where hardware is present
* Test where value is not cached
* Verify value is cached after data obtained from D-Bus
* Test where value is cached
* Test where hardware is not present
* Test where value is not cached
* Verify value is cached after data obtained from D-Bus
* Test where value is cached
* Test where D-Bus method call fails with an expected exception
* Verify false is stored in cache
* Verify false is returned
* Test where D-Bus method call fails with an unexpected exception
* Verify nothing is cached
* Verify exception is re-thrown
* clearCache()
* Verify clears all cached data
* MockServices
* Verify all methods can be called from an automated test
* Run existing automated tests

Change-Id: I3e92be3ded1ed333acbedc970409176cabe98c09
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# 906cc3f3 01-Feb-2024 Shawn McCarney <shawnmm@us.ibm.com>

pseq: Add Services class for automated testing

Add a Services class hierarchy to enable mocking and automated testing.
The class methods provide a high level abstraction for system services
like err

pseq: Add Services class for automated testing

Add a Services class hierarchy to enable mocking and automated testing.
The class methods provide a high level abstraction for system services
like error logging and presence detection.

* Services: Abstract base class
* BMCServices: Sub-class with real implementation using BMC services
* MockServices: Sub-class with mock implementation for automated testing

* Tested:
* Tested all methods in BMCServices class
* When method succeeds
* When method fails; verify all error paths
* The detailed test plan is available in a gist:
* https://gist.github.com/smccarney/e7a250011133c7e3040a8bce240705c5

Change-Id: If17ef8c4540b3ee07cced947bc49a950141b38ae
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...