History log of /openbmc/phosphor-power/tools/i2c/test/mocked_i2c_interface.cpp (Results 1 – 2 of 2)
Revision Date Author Comments
# 770de580 05-Nov-2021 Shawn McCarney <shawnmm@us.ibm.com>

Add retry support to I2CInterface

Enhance the I2CInterface class hierarchy to support retrying failed I2C
operations.

Add an optional parameter to i2c::create() to specify the m

Add retry support to I2CInterface

Enhance the I2CInterface class hierarchy to support retrying failed I2C
operations.

Add an optional parameter to i2c::create() to specify the maximum number
of retries to perform for an I2C operation. Default to 0 retries so
that existing code will not be affected.

Testing:
* Tested each modified function
* When I2C operation succeeds
* When I2C operation fails
* When no retries are done
* When retries are done
* When retried operation succeeds
* When retried operation fails
* See complete test plan at
https://gist.github.com/smccarney/8d203a40d9984402ac495dc3d689c12d

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

show more ...


# b1216b96 21-Jan-2020 Shawn McCarney <shawnmm@us.ibm.com>

Create libi2c_dev_mock.a to solve linker errors

The i2c::create() function is currently defined in
mocked_i2c_interface.hpp. This causes linker errors if that header file
is include

Create libi2c_dev_mock.a to solve linker errors

The i2c::create() function is currently defined in
mocked_i2c_interface.hpp. This causes linker errors if that header file
is included by multiple .cpp files in the same test executable.

Moved i2c::create() to mocked_i2c_interface.cpp so that it is only
defined once. Created the static library libi2c_dev_mock.a that
contains mocked_i2c_interface.o.

Test executables that need the mock version of i2c::create() should link
with libi2c_dev_mock.a.

Normal executables that need the real version of i2c::create() should
link with libi2c_dev.a as before. This has not changed.

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

show more ...