From f8930e2c8008f6e6d056dd21d2b55dd5f6a5d703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 13 Jun 2023 09:51:32 +0200 Subject: [PATCH] Fix special-case with all curves except one. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- tests/scripts/all.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index b71fd124b..f0d50d42a 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -2571,9 +2571,13 @@ psa_crypto_config_accel_all_curves_except_one () { # build with ECP_C. scripts/config.py set $BUILTIN_CURVE # Accelerate all curves listed in "crypto_config.h" (skipping the ones that - # are commented out) + # are commented out). + # Note: Those are handled in a special way by the libtestdriver machinery, + # so we only want to include them in the accel list when building the main + # libraries, hence the use of a separate variable. + loc_curve_list="" for CURVE in $(sed -n 's/^#define PSA_WANT_\(ECC_[0-9A-Z_a-z]*\).*/\1/p' <"$CRYPTO_CONFIG_H"); do - loc_accel_list="$loc_accel_list $CURVE" + loc_curve_list="$loc_curve_list $CURVE" done # Build @@ -2583,8 +2587,8 @@ psa_crypto_config_accel_all_curves_except_one () { loc_extra_list="ALG_SHA_224 ALG_SHA_256 ALG_SHA_384 ALG_SHA_512" helper_libtestdriver1_make_drivers "$loc_accel_list" "$loc_extra_list" - # build and link with test drivers - helper_libtestdriver1_make_main "$loc_accel_list" + # (See above regarding loc_curve_list.) + helper_libtestdriver1_make_main "$loc_accel_list $loc_curve_list" # make sure excluded modules were not auto-re-enabled by accident not grep mbedtls_ecdh_ library/ecdh.o