diff options
-rw-r--r-- | test/sslapitest.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c index 2c122be3c8..8e91151780 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -17,6 +17,7 @@ #include "ssltestlib.h" #include "testutil.h" +#include "testutil/output.h" #include "internal/nelem.h" #include "../ssl/ssl_locl.h" @@ -3638,6 +3639,22 @@ int setup_tests(void) || !TEST_ptr(privkey = test_get_argument(1))) return 0; + if (getenv("OPENSSL_TEST_GETCOUNTS") != NULL) { +#ifdef OPENSSL_NO_CRYPTO_MDEBUG + TEST_error("not supported in this build"); + return 0; +#else + int i, mcount, rcount, fcount; + + for (i = 0; i < 4; i++) + test_export_key_mat(i); + CRYPTO_get_alloc_counts(&mcount, &rcount, &fcount); + test_printf_stdout("malloc %d realloc %d free %d\n", + mcount, rcount, fcount); + return 1; +#endif + } + ADD_TEST(test_large_message_tls); ADD_TEST(test_large_message_tls_read_ahead); #ifndef OPENSSL_NO_DTLS |