Generate user-config-test-driver-extension.h‎ automatically #255

Open
opened 2025-12-15 11:14:29 -06:00 by gilles-peskine-arm · 0 comments
gilles-peskine-arm commented 2025-12-15 11:14:29 -06:00 (Migrated from github.com)

tests/configs/user-config-test-driver-extension.h in TF-PSA-Crypto contains macro definitions that all follow a specific pattern, and it is supposed to cover all supported cryptographic mechanisms (or at least all the ones for which we have driver support, although including the ones that don't is harmless).

If we add a new mechanism and forget to update this file, we won't be testing the corresponding driver dispatch as expected.

The goal of this task is to generate tests/configs/user-config-test-driver-extension.h automatically, which means some Python code (in generate_test_driver.py?) using our existing code to enumerate PSA crypto mechanisms, plus the instructions for CMake to build this file and have it as a dependency.

3.6 has a similar file, but it is out of scope, since we won't add any more mechanisms to 3.6.

`tests/configs/user-config-test-driver-extension.h` in TF-PSA-Crypto contains macro definitions that all follow a specific pattern, and it is supposed to cover all supported cryptographic mechanisms (or at least all the ones for which we have driver support, although including the ones that don't is harmless). If we add a new mechanism and forget to update this file, we won't be testing the corresponding driver dispatch as expected. The goal of this task is to generate `tests/configs/user-config-test-driver-extension.h` automatically, which means some Python code (in `generate_test_driver.py`?) using our existing code to enumerate PSA crypto mechanisms, plus the instructions for CMake to build this file and have it as a dependency. 3.6 has a similar file, but it is out of scope, since we won't add any more mechanisms to 3.6.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/mbedtls-framework#255
No description provided.