tests: remove duplicate component_test_psa_crypto_config_accel_hash

Following recent removal for '_reference' and '_use_psa' functions we
ended up having 2 very similar test components named
'component_test_psa_crypto_config_accel_hash', one using 'default'
configuration and the other one using the 'full' one.

Let's keep the 'full' configuration version and get rid of the 'default'
case.

Signed-off-by: Valerio Setti <[email protected]>
This commit is contained in:
Valerio Setti
2026-08-11 16:59:39 +02:00
parent 8a97676cb7
commit 67050ecbf1
@@ -1305,53 +1305,6 @@ component_test_new_psa_want_key_pair_symbol () {
fi
}
component_test_psa_crypto_config_accel_hash () {
msg "test: accelerated hash"
loc_accel_list="ALG_MD5 ALG_RIPEMD160 ALG_SHA_1 \
ALG_SHA_224 ALG_SHA_256 ALG_SHA_384 ALG_SHA_512 \
ALG_SHA3_224 ALG_SHA3_256 ALG_SHA3_384 ALG_SHA3_512"
# Configure
# ---------
# Start from default config (no USE_PSA)
helper_libtestdriver1_adjust_config "default"
# Build
# -----
helper_libtestdriver1_make_drivers "$loc_accel_list"
helper_libtestdriver1_make_main "$loc_accel_list"
# There's a risk of something getting re-enabled via config_psa.h;
# make sure it did not happen. Note: it's OK for MD_C to be enabled.
not grep mbedtls_md5 ${BUILTIN_SRC_PATH}/md5.o
not grep mbedtls_sha1 ${BUILTIN_SRC_PATH}/sha1.o
not grep mbedtls_sha256 ${BUILTIN_SRC_PATH}/sha256.o
not grep mbedtls_sha512 ${BUILTIN_SRC_PATH}/sha512.o
not grep mbedtls_ripemd160 ${BUILTIN_SRC_PATH}/ripemd160.o
# Run the tests
# -------------
msg "test: accelerated hash"
$MAKE_COMMAND test
}
# Auxiliary function to build config for hashes with and without drivers
config_psa_crypto_hash () {
driver_only="$1"
# start with config full for maximum coverage (also enables USE_PSA)
helper_libtestdriver1_adjust_config "full"
if [ "$driver_only" -eq 1 ]; then
# disable the built-in implementation of hashes
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
fi
}
component_test_psa_crypto_config_accel_hash () {
msg "test: full with accelerated hashes"
@@ -1362,7 +1315,11 @@ component_test_psa_crypto_config_accel_hash () {
# Configure
# ---------
config_psa_crypto_hash 1
helper_libtestdriver1_adjust_config "full"
# disable the built-in implementation of hashes
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
# Build
# -----