1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Clarifications & improved documentation

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard
2022-07-26 10:10:07 +02:00
parent 0aabb6d8b9
commit fca4dc6ba6
2 changed files with 39 additions and 15 deletions

View File

@ -1,13 +1,35 @@
#!/bin/sh #!/bin/sh
# This is only an example/template script, you should make a copy and edit it # This script runs tests in various revisions and configurations and analyses
# to suit your needs. The part that needs editing is at the top. # the results in order to highlight any difference in the set of tests skipped
# in the test suites of interest.
#
# It can be used to ensure the testing criteria mentioned in strategy.md,
# end of section "Supporting builds with drivers without the software
# implementation" are met, namely:
#
# - the sets of tests skipped in the default config and the full config must be
# the same before and after the PR that implements step 3;
# - the set of tests skipped in the driver-only build is the same as in an
# equivalent software-based configuration, or the difference is small enough,
# justified, and a github issue is created to track it.
#
# WARNING: this script checks out a commit other than the head of the current
# branch; it checks out the current branch again when running sucessfully,
# but while the script is running, or if it terminates early in error, you
# should be aware that yu might be at a different commit than expected.
#
# NOTE: This is only an example/template script, you should make a copy and
# edit it to suit your needs. The part that needs editing is at the top.
# #
# Also, you can comment out parts that don't need to be re-done when # Also, you can comment out parts that don't need to be re-done when
# re-running this script (for example "get numbers before this PR"). # re-running this script (for example "get numbers before this PR").
# ----- BEGIN edit this ----- # ----- BEGIN edit this -----
# The component in all.sh that builds and tests with drivers.
DRIVER_COMPONENT=test_psa_crypto_config_accel_hash_use_psa DRIVER_COMPONENT=test_psa_crypto_config_accel_hash_use_psa
# A similar configuration to that of the component, except without drivers,
# for comparison.
reference_config () { reference_config () {
scripts/config.py set MBEDTLS_USE_PSA_CRYPTO scripts/config.py set MBEDTLS_USE_PSA_CRYPTO
scripts/config.py unset MBEDTLS_PKCS1_V21 scripts/config.py unset MBEDTLS_PKCS1_V21
@ -16,6 +38,7 @@ reference_config () {
scripts/config.py unset MBEDTLS_PKCS12_C scripts/config.py unset MBEDTLS_PKCS12_C
scripts/config.py unset MBEDTLS_ECDSA_DETERMINISTIC scripts/config.py unset MBEDTLS_ECDSA_DETERMINISTIC
} }
# Space-separated list of test suites of interest.
SUITES="rsa pkcs1_v15 pk pkparse pkwrite" SUITES="rsa pkcs1_v15 pk pkparse pkwrite"
# ----- END edit this ----- # ----- END edit this -----

View File

@ -363,12 +363,13 @@ the right places (once the previous steps are done).
**Note on testing** **Note on testing**
Since supporting driver-only builds is not about adding features, but also Since supporting driver-only builds is not about adding features, but about
supporting existing features in new types of builds, the existing tests should supporting existing features in new types of builds, testing will not involve
be enough to cover everything, as long as they're run in the newly supported adding cases to the test suites, but instead adding new components in `all.sh`
configurations. An all.sh component needs to be present each main type of that build and run tests in newly-supported configurations. For example, if
configutation we support (for example, with this (family of) algorithm we're making some part of the library work with hashes provided only by
driver-only, with or without `USE_PSA`). drivers when `MBEDTLS_USE_PSA_CRYPTO` is defined, there should be a place in
`all.sh` that builds and run tests in such a configuration.
There is however a risk, especially in step 3 where we change how dependencies There is however a risk, especially in step 3 where we change how dependencies
are expressed (sometimes in bulk), to get things wrong in a way that would are expressed (sometimes in bulk), to get things wrong in a way that would