diff options
author | Emilia Kasper <emilia@openssl.org> | 2016-04-05 14:29:06 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2016-04-05 17:05:40 +0200 |
commit | ababe86b9674dca24ffb6b342fe7af852cf53466 (patch) | |
tree | ee83b13735085f16145d498f8a1b8626538121ad /test/ssl_test.c | |
parent | 6e863f07376e1c8ae7c89477234db50838784d99 (diff) |
testutil: return 1 on success
Require that test methods return 1 on success (not 0). This is more
customary for OpenSSL.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/ssl_test.c')
-rw-r--r-- | test/ssl_test.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ssl_test.c b/test/ssl_test.c index 01ce5d5684..499afd5e23 100644 --- a/test/ssl_test.c +++ b/test/ssl_test.c @@ -140,8 +140,7 @@ static int check_test(HANDSHAKE_RESULT result, SSL_TEST_CTX *test_ctx) static int execute_test(SSL_TEST_FIXTURE fixture) { - /* TODO(emilia): this is confusing. Flip to return 1 on success. */ - int ret = 1; + int ret = 0; SSL_CTX *server_ctx = NULL, *client_ctx = NULL; SSL_TEST_CTX *test_ctx = NULL; HANDSHAKE_RESULT result; @@ -163,15 +162,14 @@ static int execute_test(SSL_TEST_FIXTURE fixture) result = do_handshake(server_ctx, client_ctx); - if (check_test(result, test_ctx)) - ret = 0; + ret = check_test(result, test_ctx); err: CONF_modules_unload(0); SSL_CTX_free(server_ctx); SSL_CTX_free(client_ctx); SSL_TEST_CTX_free(test_ctx); - if (ret != 0) + if (ret != 1) ERR_print_errors_fp(stderr); return ret; } |