
Hi Simon,
On Wed, Jan 13, 2021 at 6:12 PM Simon Glass sjg@chromium.org wrote:
On Tue, 12 Jan 2021 at 01:44, Jorge Ramirez-Ortiz jorge@foundries.io wrote:
From: Igor Opaniuk igor.opaniuk@foundries.io
Extend existing DM tee tests adding test coverage for reverse RPC calls. Currently this commit only adds tests for I2C requests from TEE driver to TEE supplicant, for instance reading/writing data to emulated i2c eeprom defines in standard sandbox test device tree (arch/sandbox/dts/test.dtb):
=> i2c bus Bus 0: i2c@0 (active 0) 2c: eeprom@2c, offset len 1, flags 0 ...
Running TEE tests: => ut dm tee Test: dm_test_tee: tee.c Test: dm_test_tee: tee.c (flat tree) Failures: 0
Signed-off-by: Igor Opaniuk igor.opaniuk@foundries.io
test/dm/tee.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 104 insertions(+), 5 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
I wonder if the #ifdefs could go away, or at least be reduced. Perhaps just assuming that the option is enabled on sandbox?
I've switched to "if (IS_ENABLED(CONFIG_*))" in test/dm/tee.c, however for dropping all ifdefs in sandbox.c likely we have to do a complete overhaul of tee sandbox driver structure, moving all TA specific code to separate files (`sandbox-avb.c` etc), which IMHO is out of scope of the current patchset. I'll address that in another patchset if you don't have objections.
Jorge will send another version of this patchset including my changes in test/dm/tee.c.