[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Nov 23 15:46:25 UTC 2016


The branch master has been updated
       via  fb83f20c30784aa863a0611fda5f09f488af463a (commit)
      from  6530c4909ffbf4fd655416cbd765b1e7174b9b83 (commit)


- Log -----------------------------------------------------------------
commit fb83f20c30784aa863a0611fda5f09f488af463a
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Nov 17 11:12:20 2016 +0000

    Update tls13secretstest to use the new simpler test framework
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 test/build.info         |  2 +-
 test/tls13secretstest.c | 24 ++----------------------
 2 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/test/build.info b/test/build.info
index 31fa67d..16c32ad 100644
--- a/test/build.info
+++ b/test/build.info
@@ -356,7 +356,7 @@ IF[{- !$disabled{tests} -}]
   # build
   IF[{- !$disabled{shared} -}]
     PROGRAMS_NO_INST=tls13secretstest
-    SOURCE[tls13secretstest]=tls13secretstest.c testutil.c
+    SOURCE[tls13secretstest]=tls13secretstest.c testutil.c test_main.c
     SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
     INCLUDE[tls13secretstest]=.. ../include
     DEPEND[tls13secretstest]=../libcrypto ../libssl
diff --git a/test/tls13secretstest.c b/test/tls13secretstest.c
index ccb8a12..8734f2a 100644
--- a/test/tls13secretstest.c
+++ b/test/tls13secretstest.c
@@ -12,6 +12,7 @@
 #include "../ssl/ssl_locl.h"
 
 #include "testutil.h"
+#include "test_main.h"
 
 #define IVLEN   12
 #define KEYLEN  16
@@ -342,28 +343,7 @@ static int test_handshake_secrets(void)
     return ret;
 }
 
-int main(int argc, char *argv[])
+void register_tests()
 {
-    BIO *err = NULL;
-    int testresult = 1;
-
-    err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
-
-    CRYPTO_set_mem_debug(1);
-    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
-
     ADD_TEST(test_handshake_secrets);
-
-    testresult = run_tests(argv[0]);
-
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
-    if (CRYPTO_mem_leaks(err) <= 0)
-        testresult = 1;
-#endif
-    BIO_free(err);
-
-    if (!testresult)
-        fprintf(stderr, "PASS\n");
-
-    return testresult;
 }


More information about the openssl-commits mailing list