mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Make sure accel list stays up-to-date in user-config-for-tests.h

Open mpg opened this issue 1 year ago • 1 comments

Currently user-config-for-tests.h has to list all mechanisms that can be accelerate by a driver. This means that when a new mechanism is added, we need to remember to update that file with the corresponding MBEDTLS_PSA_ACCEL macro.

Experience shows we tend to forget, unsurprisingly.

This task is to make sure the list remains up-to-date. This could be done in a number of ways, including:

  • make the list auto-generated from psa/crypto_config.h;
  • keep the list manually maintained but add a checker script that compares it to psa/crypto_config.h.

Note: there's a similar issue with crypto_config_test_driver_extension.h, though there instead of one macro per mechanism we have an #ifdef block per mechanism. It would be good if the strategy chosen for user-config-for-tests.h could also apply to crypto_config_test_driver_extension.h.

mpg avatar Apr 12 '24 07:04 mpg

Perhaps overkill, but maybe we should automatically generate a positive driver dispatch test case for every mechanism, like we do for basic operations? Then we'll know of the omission because that test case won't run on the CI.

gilles-peskine-arm avatar Apr 12 '24 08:04 gilles-peskine-arm