Page MenuHomePhabricator

AUDIT_LOG secure regression tests don't compile with TFM_PSA_API=ON
Closed, ResolvedPublic

Description

This combination

-DTEST_S=ON -DTFM_PARTITION_AUDIT_LOG=ON -DTFM_PSA_API=ON

gives me a compilation error:

tf-m-tests/test/framework/secure_suites.c:69:7: error: 'register_testsuite_s_audit_interface' undeclared here (not in a function); did you mean 'register_testsuite_s_ipc_interface'?
   69 |     {&register_testsuite_s_audit_interface, 0, 0, 0},
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       register_testsuite_s_ipc_interface

Tested on nrf5340 and AN521, Make and Ninja.

Minimal call to reproduce:

cmake .. -DTFM_PLATFORM=mps2/an521 -DTEST_S=ON -DTFM_PARTITION_AUDIT_LOG=ON -DTFM_PSA_API=ON

Event Timeline

davidwang reassigned this task from Anton-TF to davidhuziji.Mon, Mar 29, 3:22 AM
davidwang added a subscriber: Anton-TF.

TF-M audit log service doesn't implement IPC model interface. Therefore it is not enabled by default in IPC model.
IPC model default configuration disables TF-M audit log. Please see: https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/config/tfm_ipc_config_default.cmake

If audit log service is forced to be enabled, it is non-compliant to IPC model and the build will fail.

I see. It would be good to have an error message in that case.

Great suggestion. Will add one in build configuration check soon.

davidhuziji closed this task as Resolved.Mon, Mar 29, 8:16 AM