From 740e43f074a9328415092402fe6a5398fc79aa4c Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 14 Feb 2025 09:43:54 +1100 Subject: [PATCH] evp_test: add concept of extended tests to evp_test These tests are not run by default, instead they run when the EVP_TEST_EXTENDED environment variable has an integer value other than zero. Reviewed-by: Tim Hudson Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/26750) --- test/evp_test.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/evp_test.c b/test/evp_test.c index 1ec5b7aab17..f781724e659 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -86,6 +86,7 @@ static OSSL_PROVIDER *prov_null = NULL; static OSSL_PROVIDER *libprov = NULL; static OSSL_LIB_CTX *libctx = NULL; static int fips_indicator_callback_unapproved_count = 0; +static int extended_tests = 0; /* List of public and private keys */ static KEY_LIST *private_keys; @@ -5195,6 +5196,12 @@ start: } } else if (strcmp(pp->key, "Unapproved") == 0) { t->expect_unapproved = 1; + } else if (strcmp(pp->key, "Extended-Test") == 0) { + if (!extended_tests) { + TEST_info("skipping extended test: %s:%d", + t->s.test_file, t->s.start); + t->skip = 1; + } } else { /* Must be test specific line: try to parse it */ int rv = t->meth->parse(t, pp->key, pp->value); @@ -5279,6 +5286,8 @@ int setup_tests(void) OPTION_CHOICE o; + extended_tests = getenv("EVP_TEST_EXTENDED") != NULL; + while ((o = opt_next()) != OPT_EOF) { switch (o) { case OPT_CONFIG_FILE: -- 2.47.2