From 0a342c95120914719293c119fbe40701fe77e665 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Fri, 1 Sep 2023 09:12:31 +0200 Subject: [PATCH] test: fix comments and functions' naming Signed-off-by: Valerio Setti --- tests/scripts/all.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 708396afc..2d4507dbb 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -904,8 +904,8 @@ helper_libtestdriver1_adjust_config() { } # When called with no parameter this function disables all builtin curves. -# The function optionally accepts 1 parameter with the list of the curves that -# should be kept enabled. +# The function optionally accepts 1 parameter with the space-separated list +# of the curves that should be kept enabled. helper_disable_builtin_curves() { allowed_list="${1:-}" scripts/config.py unset-all "MBEDTLS_ECP_DP_[0-9A-Z_a-z]*_ENABLED" @@ -928,9 +928,9 @@ helper_get_psa_curve_list () { } # Get the list of uncommented PSA_WANT_KEY_TYPE_xxx_ from CRYPTO_CONFIG_H. This -# is useful to easily get a list of key symbols accelerate. +# is useful to easily get a list of key type symbols to accelerate. # The function accepts a single argument which is the key type: ECC, DH, RSA. -helper_get_psa_keys_list() { +helper_get_psa_key_type_list() { KEY_TYPE="$1" loc_list="" for ITEM in $(sed -n "s/^#define PSA_WANT_\(KEY_TYPE_${KEY_TYPE}_[0-9A-Z_a-z]*\).*/\1/p" <"$CRYPTO_CONFIG_H"); do @@ -2338,7 +2338,7 @@ component_test_psa_crypto_config_accel_ecdsa () { # Algorithms and key types to accelerate loc_accel_list="ALG_ECDSA ALG_DETERMINISTIC_ECDSA \ - $(helper_get_psa_keys_list "ECC")" + $(helper_get_psa_key_type_list "ECC")" loc_curve_list="$(helper_get_psa_curve_list)" @@ -2382,7 +2382,7 @@ component_test_psa_crypto_config_accel_ecdh () { # Algorithms and key types to accelerate loc_accel_list="ALG_ECDH \ - $(helper_get_psa_keys_list "ECC")" + $(helper_get_psa_key_type_list "ECC")" loc_curve_list="$(helper_get_psa_curve_list)" @@ -2424,7 +2424,7 @@ component_test_psa_crypto_config_accel_ffdh () { # Algorithms and key types to accelerate loc_accel_list="ALG_FFDH \ - $(helper_get_psa_keys_list "DH")" + $(helper_get_psa_key_type_list "DH")" # Configure # --------- @@ -2545,7 +2545,7 @@ component_test_psa_crypto_config_accel_ecc_ecp_light_only () { loc_accel_list="ALG_ECDSA ALG_DETERMINISTIC_ECDSA \ ALG_ECDH \ ALG_JPAKE \ - $(helper_get_psa_keys_list "ECC")" + $(helper_get_psa_key_type_list "ECC")" loc_curve_list="$(helper_get_psa_curve_list)" @@ -2555,7 +2555,7 @@ component_test_psa_crypto_config_accel_ecc_ecp_light_only () { # Use the same config as reference, only without built-in EC algs config_psa_crypto_config_ecp_light_only 1 - # Do not disable builtin curves because that support is rquired for: + # Do not disable builtin curves because that support is required for: # - MBEDTLS_PK_PARSE_EC_EXTENDED # - MBEDTLS_PK_PARSE_EC_COMPRESSED @@ -2650,7 +2650,7 @@ component_test_psa_crypto_config_accel_ecc_no_ecp_at_all () { loc_accel_list="ALG_ECDSA ALG_DETERMINISTIC_ECDSA \ ALG_ECDH \ ALG_JPAKE \ - $(helper_get_psa_keys_list "ECC")" + $(helper_get_psa_key_type_list "ECC")" loc_curve_list="$(helper_get_psa_curve_list)" @@ -2818,7 +2818,7 @@ common_test_psa_crypto_config_accel_ecc_ffdh_no_bignum () { loc_accel_list="ALG_ECDSA ALG_DETERMINISTIC_ECDSA \ ALG_ECDH \ ALG_JPAKE \ - $(helper_get_psa_keys_list "ECC")" + $(helper_get_psa_key_type_list "ECC")" # Optionally we can also add DH to the list of accelerated items if [ "$TEST_TARGET" = "ECC_DH" ]; then loc_accel_list="$loc_accel_list \ @@ -3033,7 +3033,7 @@ psa_crypto_config_accel_all_curves_except_one () { loc_accel_list="ALG_ECDH \ ALG_ECDSA ALG_DETERMINISTIC_ECDSA \ ALG_JPAKE \ - $(helper_get_psa_keys_list "ECC")" + $(helper_get_psa_key_type_list "ECC")" # Configure # ---------