Skip restyling of PSA macros also defined in psa-arch-tests

Some preprocessor macro definitions must have a specific expansion so that
the same macro name can be defined in different products. The definition of
having the same expansion (per the C language specification) means the same
sequence of tokens, and also the same absence/presence of spacing between
tokens.

Two macros are also defined in headers in the PSA Compliance test suite, so
the test suite would fail to build if we changed the definitions. Preserve
those definitions. Technically this is a bug in the test suite, since having
extra spaces (or even a completely different constant expression with the
same value) would still be compliant. Bug reported as
https://github.com/ARM-software/psa-arch-tests/issues/337

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-01-04 19:52:38 +01:00
parent 45873ceba3
commit a651607b37

View File

@ -892,7 +892,9 @@
(alg) & PSA_ALG_KEY_DERIVATION_STRETCHING_FLAG) (alg) & PSA_ALG_KEY_DERIVATION_STRETCHING_FLAG)
/** An invalid algorithm identifier value. */ /** An invalid algorithm identifier value. */
/* *INDENT-OFF* (https://github.com/ARM-software/psa-arch-tests/issues/337) */
#define PSA_ALG_NONE ((psa_algorithm_t)0) #define PSA_ALG_NONE ((psa_algorithm_t)0)
/* *INDENT-ON* */
#define PSA_ALG_HASH_MASK ((psa_algorithm_t)0x000000ff) #define PSA_ALG_HASH_MASK ((psa_algorithm_t)0x000000ff)
/** MD5 */ /** MD5 */
@ -2387,7 +2389,9 @@
/** The null key identifier. /** The null key identifier.
*/ */
/* *INDENT-OFF* (https://github.com/ARM-software/psa-arch-tests/issues/337) */
#define PSA_KEY_ID_NULL ((psa_key_id_t)0) #define PSA_KEY_ID_NULL ((psa_key_id_t)0)
/* *INDENT-ON* */
/** The minimum value for a key identifier chosen by the application. /** The minimum value for a key identifier chosen by the application.
*/ */
#define PSA_KEY_ID_USER_MIN ((psa_key_id_t)0x00000001) #define PSA_KEY_ID_USER_MIN ((psa_key_id_t)0x00000001)