Skip to content

Commit 6daf4ef

Browse files
Merge pull request #9914 from Harry-Ramsey/remove-tf-psa-crypto-test
Remove check_test_dependencies TF-PSA-Crypto test from Mbed TLS
2 parents bff7733 + cec9562 commit 6daf4ef

File tree

3 files changed

+2
-61
lines changed

3 files changed

+2
-61
lines changed

tests/scripts/components-basic-checks.sh

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -74,65 +74,6 @@ component_check_test_cases () {
7474
unset opt
7575
}
7676

77-
component_check_test_dependencies () {
78-
msg "Check: test case dependencies: legacy vs PSA" # < 1s
79-
# The purpose of this component is to catch unjustified dependencies on
80-
# legacy feature macros (MBEDTLS_xxx) in PSA tests. Generally speaking,
81-
# PSA test should use PSA feature macros (PSA_WANT_xxx, more rarely
82-
# MBEDTLS_PSA_xxx).
83-
#
84-
# Most of the time, use of legacy MBEDTLS_xxx macros are mistakes, which
85-
# this component is meant to catch. However a few of them are justified,
86-
# mostly by the absence of a PSA equivalent, so this component includes a
87-
# list of expected exceptions.
88-
89-
found="check-test-deps-found-$$"
90-
expected="check-test-deps-expected-$$"
91-
92-
# Find legacy dependencies in PSA tests
93-
grep 'depends_on' \
94-
tf-psa-crypto/tests/suites/test_suite_psa*.data \
95-
tf-psa-crypto/tests/suites/test_suite_psa*.function |
96-
grep -Eo '!?MBEDTLS_[^: ]*' |
97-
grep -v -e MBEDTLS_PSA_ -e MBEDTLS_TEST_ |
98-
sort -u > $found
99-
100-
# Expected ones with justification - keep in sorted order by ASCII table!
101-
rm -f $expected
102-
# No PSA equivalent - WANT_KEY_TYPE_AES means all sizes
103-
echo "!MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH" >> $expected
104-
# No PSA equivalent - used to skip decryption tests in PSA-ECB, CBC/XTS/NIST_KW/DES
105-
echo "!MBEDTLS_BLOCK_CIPHER_NO_DECRYPT" >> $expected
106-
# MBEDTLS_ASN1_WRITE_C is used by import_rsa_made_up() in test_suite_psa_crypto
107-
# in order to build a fake RSA key of the wanted size based on
108-
# PSA_VENDOR_RSA_MAX_KEY_BITS. The legacy module is only used by
109-
# the test code and that's probably the most convenient way of achieving
110-
# the test's goal.
111-
echo "MBEDTLS_ASN1_WRITE_C" >> $expected
112-
# No PSA equivalent - used in test_suite_psa_crypto to get some "known" size
113-
# for raw key generation.
114-
echo "MBEDTLS_CTR_DRBG_MAX_REQUEST" >> $expected
115-
# No PSA equivalent - we should probably have one in the future.
116-
echo "MBEDTLS_ECP_RESTARTABLE" >> $expected
117-
# No PSA equivalent - needed by some init tests
118-
echo "MBEDTLS_ENTROPY_NV_SEED" >> $expected
119-
# No PSA equivalent - required to run threaded tests.
120-
echo "MBEDTLS_THREADING_PTHREAD" >> $expected
121-
122-
# Compare reality with expectation.
123-
# We want an exact match, to ensure the above list remains up-to-date.
124-
#
125-
# The output should be empty. When it's not:
126-
# - Each '+' line is a macro that was found but not expected. You want to
127-
# find where that macro occurs, and either replace it with PSA macros, or
128-
# add it to the exceptions list above with a justification.
129-
# - Each '-' line is a macro that was expected but not found; it means the
130-
# exceptions list above should be updated by removing that macro.
131-
diff -U0 $expected $found
132-
133-
rm $found $expected
134-
}
135-
13677
component_check_doxygen_warnings () {
13778
msg "Check: doxygen warnings (builds the documentation)" # ~ 3s
13879
./framework/scripts/doxygen.sh

0 commit comments

Comments
 (0)