From e65bfe644964e4e70f8a6834fe661ac73ed8c750 Mon Sep 17 00:00:00 2001 From: Harry Ramsey Date: Fri, 17 Jan 2025 09:19:18 +0000 Subject: [PATCH 1/3] Remove check_test_dependencies TF-PSA-Crypto test from Mbed TLS This commit removes the check_test_dependencies from Mbed TLS as it has been added to TF-PSA-Crypto. Signed-off-by: Harry Ramsey --- tests/scripts/components-basic-checks.sh | 59 ------------------------ 1 file changed, 59 deletions(-) diff --git a/tests/scripts/components-basic-checks.sh b/tests/scripts/components-basic-checks.sh index 6266e9f07f..3ee88a3c21 100644 --- a/tests/scripts/components-basic-checks.sh +++ b/tests/scripts/components-basic-checks.sh @@ -74,65 +74,6 @@ component_check_test_cases () { unset opt } -component_check_test_dependencies () { - msg "Check: test case dependencies: legacy vs PSA" # < 1s - # The purpose of this component is to catch unjustified dependencies on - # legacy feature macros (MBEDTLS_xxx) in PSA tests. Generally speaking, - # PSA test should use PSA feature macros (PSA_WANT_xxx, more rarely - # MBEDTLS_PSA_xxx). - # - # Most of the time, use of legacy MBEDTLS_xxx macros are mistakes, which - # this component is meant to catch. However a few of them are justified, - # mostly by the absence of a PSA equivalent, so this component includes a - # list of expected exceptions. - - found="check-test-deps-found-$$" - expected="check-test-deps-expected-$$" - - # Find legacy dependencies in PSA tests - grep 'depends_on' \ - tf-psa-crypto/tests/suites/test_suite_psa*.data \ - tf-psa-crypto/tests/suites/test_suite_psa*.function | - grep -Eo '!?MBEDTLS_[^: ]*' | - grep -v -e MBEDTLS_PSA_ -e MBEDTLS_TEST_ | - sort -u > $found - - # Expected ones with justification - keep in sorted order by ASCII table! - rm -f $expected - # No PSA equivalent - WANT_KEY_TYPE_AES means all sizes - echo "!MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH" >> $expected - # No PSA equivalent - used to skip decryption tests in PSA-ECB, CBC/XTS/NIST_KW/DES - echo "!MBEDTLS_BLOCK_CIPHER_NO_DECRYPT" >> $expected - # MBEDTLS_ASN1_WRITE_C is used by import_rsa_made_up() in test_suite_psa_crypto - # in order to build a fake RSA key of the wanted size based on - # PSA_VENDOR_RSA_MAX_KEY_BITS. The legacy module is only used by - # the test code and that's probably the most convenient way of achieving - # the test's goal. - echo "MBEDTLS_ASN1_WRITE_C" >> $expected - # No PSA equivalent - used in test_suite_psa_crypto to get some "known" size - # for raw key generation. - echo "MBEDTLS_CTR_DRBG_MAX_REQUEST" >> $expected - # No PSA equivalent - we should probably have one in the future. - echo "MBEDTLS_ECP_RESTARTABLE" >> $expected - # No PSA equivalent - needed by some init tests - echo "MBEDTLS_ENTROPY_NV_SEED" >> $expected - # No PSA equivalent - required to run threaded tests. - echo "MBEDTLS_THREADING_PTHREAD" >> $expected - - # Compare reality with expectation. - # We want an exact match, to ensure the above list remains up-to-date. - # - # The output should be empty. When it's not: - # - Each '+' line is a macro that was found but not expected. You want to - # find where that macro occurs, and either replace it with PSA macros, or - # add it to the exceptions list above with a justification. - # - Each '-' line is a macro that was expected but not found; it means the - # exceptions list above should be updated by removing that macro. - diff -U0 $expected $found - - rm $found $expected -} - component_check_doxygen_warnings () { msg "Check: doxygen warnings (builds the documentation)" # ~ 3s ./framework/scripts/doxygen.sh From 28eed1abff8f607069b22209308859c01155b7c8 Mon Sep 17 00:00:00 2001 From: Harry Ramsey Date: Fri, 17 Jan 2025 09:21:32 +0000 Subject: [PATCH 2/3] Update TF-PSA-Crypto pointer This commit updates TF-PSA-Crypto pointer to include the moved test in Mbed TLS via TF-PSA-Crypto. Signed-off-by: Harry Ramsey --- tf-psa-crypto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tf-psa-crypto b/tf-psa-crypto index c78da5a1e7..3671d64374 160000 --- a/tf-psa-crypto +++ b/tf-psa-crypto @@ -1 +1 @@ -Subproject commit c78da5a1e7fd503685f28b18e17756a38f10444e +Subproject commit 3671d643746853b4a49fe25dda7842d6c22c026b From cec956263d9cd8fccfc9c537298c7f3ec006d1bf Mon Sep 17 00:00:00 2001 From: Harry Ramsey Date: Fri, 17 Jan 2025 09:48:55 +0000 Subject: [PATCH 3/3] Update framework pointer This commit updates the framework pointer to include modified collect_test_cases.py which can run independently for TF-PSA-Crypto. Signed-off-by: Harry Ramsey --- framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework b/framework index 57ee691a3e..1ead596839 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit 57ee691a3e57f172a03c3f2f5c4da457e8fabf3c +Subproject commit 1ead5968394ac9e66b2ddb8fdb96faafcaa032de