From ada30fe650407c3fee80adde3cfe2801ec4b3e2e Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 23 May 2024 15:50:44 +0200 Subject: [PATCH] New test suite to report configuration options Add a test suite intended to report configuration options in the outcome file: we're only interested in SKIP vs PASS. Add a few test cases for some interesting combinations of options. The selection here is just for illustration purposes, more will be added later. A subsequent commit will automatically generate test cases for single options. Signed-off-by: Gilles Peskine --- .../test_suite_config.crypto_combinations.data | 9 +++++++++ tests/suites/test_suite_config.function | 14 ++++++++++++++ .../suites/test_suite_config.psa_combinations.data | 9 +++++++++ .../suites/test_suite_config.tls_combinations.data | 9 +++++++++ 4 files changed, 41 insertions(+) create mode 100644 tests/suites/test_suite_config.crypto_combinations.data create mode 100644 tests/suites/test_suite_config.function create mode 100644 tests/suites/test_suite_config.psa_combinations.data create mode 100644 tests/suites/test_suite_config.tls_combinations.data diff --git a/tests/suites/test_suite_config.crypto_combinations.data b/tests/suites/test_suite_config.crypto_combinations.data new file mode 100644 index 0000000000..d3287d266a --- /dev/null +++ b/tests/suites/test_suite_config.crypto_combinations.data @@ -0,0 +1,9 @@ +# Interesting combinations of low-level crypto options + +Config: ECC: Weierstrass curves only +depends_on:MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED:!MBEDTLS_ECP_MONTGOMERY_ENABLED +pass: + +Config: ECC: Montgomery curves only +depends_on:!MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED:MBEDTLS_ECP_MONTGOMERY_ENABLED +pass: diff --git a/tests/suites/test_suite_config.function b/tests/suites/test_suite_config.function new file mode 100644 index 0000000000..9e9dd01990 --- /dev/null +++ b/tests/suites/test_suite_config.function @@ -0,0 +1,14 @@ +/* BEGIN_HEADER */ + +/* END_HEADER */ + +/* BEGIN_CASE */ +/* This test case always passes. It is intended solely for configuration + * reporting in the outcome file. Write test cases using this function + * with dependencies to record in which configurations the dependencies + * are met. */ +void pass() +{ + goto exit; +} +/* END_CASE */ diff --git a/tests/suites/test_suite_config.psa_combinations.data b/tests/suites/test_suite_config.psa_combinations.data new file mode 100644 index 0000000000..1035af2487 --- /dev/null +++ b/tests/suites/test_suite_config.psa_combinations.data @@ -0,0 +1,9 @@ +# Interesting combinations of PSA options + +Config: PSA_WANT_ALG_ECDSA without PSA_WANT_ALG_DETERMINISTIC_ECDSA +depends_on:PSA_WANT_ALG_ECDSA:!PSA_WANT_ALG_DETERMINISTIC_ECDSA +pass: + +Config: PSA_WANT_ALG_DETERMINSTIC_ECDSA without PSA_WANT_ALG_ECDSA +depends_on:PSA_WANT_ALG_DETERMINISTIC_ECDSA:!PSA_WANT_ALG_ECDSA +pass: diff --git a/tests/suites/test_suite_config.tls_combinations.data b/tests/suites/test_suite_config.tls_combinations.data new file mode 100644 index 0000000000..cbc57d6cd3 --- /dev/null +++ b/tests/suites/test_suite_config.tls_combinations.data @@ -0,0 +1,9 @@ +# Interesting combinations of TLS options + +Config: TLS 1.2 without TLS 1.3 +depends_on:MBEDTLS_SSL_PROTO_TLS1_2:!MBEDTLS_SSL_PROTO_TLS1_3 +pass: + +Config: TLS 1.3 without TLS 1.2 +depends_on:MBEDTLS_SSL_PROTO_TLS1_3:!MBEDTLS_SSL_PROTO_TLS1_2 +pass: