diff options
author | Pauli <paul.dale@oracle.com> | 2017-07-27 08:08:36 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-07-27 08:08:36 +1000 |
commit | 43405889f47648ee70c1b412b8b71570e8aaa24a (patch) | |
tree | 427775a68a0807bafb1cf521ca102fc7917dc771 | |
parent | ad887416f1e59c3294a7d8f83a0ca77120523b4a (diff) |
Fix the two new tests since approval.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3953)
-rw-r--r-- | test/asn1_string_table_test.c | 3 | ||||
-rw-r--r-- | test/sslbuffertest.c | 30 |
2 files changed, 18 insertions, 15 deletions
diff --git a/test/asn1_string_table_test.c b/test/asn1_string_table_test.c index 7e542b952e..291341464e 100644 --- a/test/asn1_string_table_test.c +++ b/test/asn1_string_table_test.c @@ -70,7 +70,8 @@ static int test_string_tbl() return rv; } -void register_tests(void) +int setup_tests(void) { ADD_TEST(test_string_tbl); + return 1; } diff --git a/test/sslbuffertest.c b/test/sslbuffertest.c index 72cb987ba0..6010976370 100644 --- a/test/sslbuffertest.c +++ b/test/sslbuffertest.c @@ -150,31 +150,33 @@ static int test_func(int test) return result; } -int test_main(int argc, char *argv[]) +int global_init(void) { - int testresult = EXIT_FAILURE; - CRYPTO_set_mem_debug(1); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + return 1; +} - if (argc != 3) { - TEST_error("Invalid argument count\n"); - goto end; - } +int setup_tests(void) +{ + char *cert, *pkey; + + if (!TEST_ptr(cert = test_get_argument(0)) + || !TEST_ptr(pkey = test_get_argument(1))) + return 0; if (!create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), - &serverctx, &clientctx, argv[1], argv[2])) { + &serverctx, &clientctx, cert, pkey)) { TEST_error("Failed to create SSL_CTX pair\n"); - goto end; + return 0; } ADD_ALL_TESTS(test_func, 9); + return 1; +} - testresult = run_tests(argv[0]); - - end: +void cleanup_tests(void) +{ SSL_CTX_free(clientctx); SSL_CTX_free(serverctx); - - return testresult; } |