Skip to content

Commit

Permalink
provider test: don't run configuration based tests if configuration i…
Browse files Browse the repository at this point in the history
…sn't loaded

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from #21621)
  • Loading branch information
paulidale committed Aug 4, 2023
1 parent 52ea255 commit a9dde74
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/provider_internal_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static int test_loaded_provider(void)
&& test_provider(prov, expected_greeting1(name));
}

# ifndef OPENSSL_NO_AUTOLOAD_CONFIG
static int test_configured_provider(void)
{
const char *name = "p_test_configured";
Expand All @@ -95,6 +96,7 @@ static int test_configured_provider(void)
TEST_ptr(prov = ossl_provider_find(NULL, name, 0))
&& test_provider(prov, expected_greeting);
}
# endif
#endif

static int test_cache_flushes(void)
Expand Down Expand Up @@ -139,7 +141,9 @@ int setup_tests(void)
ADD_TEST(test_builtin_provider);
#ifndef NO_PROVIDER_MODULE
ADD_TEST(test_loaded_provider);
# ifndef OPENSSL_NO_AUTOLOAD_CONFIG
ADD_TEST(test_configured_provider);
# endif
#endif
ADD_TEST(test_cache_flushes);
return 1;
Expand Down

0 comments on commit a9dde74

Please sign in to comment.