* - rcount: Number of reallocs counted
* - fcount: Number of frees counted
* - scount: Number of mallocs counted prior to workload
+ * - srcount: Number of reallocs counted prior to workload
*/
static char *cert = NULL;
static char *privkey = NULL;
-static int mcount, rcount, fcount, scount;
+static int mcount, rcount, fcount, scount, srcount;
/**
* @brief Performs an SSL/TLS handshake between a test client and server.
CRYPTO_get_alloc_counts(&mcount, &rcount, &fcount);
/*
* Report our memory allocations from the count run
- * NOTE: We report a number of allocations to skip here
- * (the scount value). These are the allocations that took
- * place while the test harness itself was getting setup
- * (i.e. calling OPENSSL_init_crypto/etc). We can't fail
+ * NOTE: We report a number of (re)allocations to skip here
+ * (the scount + srcount value). These are the allocations
+ * that took place while the test harness itself was getting
+ * setup (i.e. calling OPENSSL_init_crypto/etc). We can't fail
* those allocations as they will cause the test to fail before
* we have even run the workload. So report them so we can
* allow them to function before we start doing any real testing
*/
- TEST_info("skip: %d count %d\n", scount, mcount - scount);
+ TEST_info("skip: %d count %d\n",
+ scount + srcount, mcount + rcount - scount - srcount);
return 1;
}
goto err;
if (strcmp(opmode, "count") == 0) {
- CRYPTO_get_alloc_counts(&scount, &rcount, &fcount);
+ CRYPTO_get_alloc_counts(&scount, &srcount, &fcount);
ADD_TEST(test_record_alloc_counts);
ADD_TEST(test_report_alloc_counts);
} else {
char *default_config_file = NULL;
static char *certfile = NULL;
-static int mcount, rcount, fcount, scount;
+static int mcount, rcount, fcount, scount, srcount;
static int do_load_key_certs_crls(int allow_failure)
{
static int test_report_alloc_counts(void)
{
CRYPTO_get_alloc_counts(&mcount, &rcount, &fcount);
- TEST_info("skip: %d count %d\n", scount, mcount - scount);
+ TEST_info("skip: %d count %d\n",
+ scount + srcount, mcount + rcount - scount - srcount);
return 1;
}
goto err;
if (strcmp(opmode, "count") == 0) {
- CRYPTO_get_alloc_counts(&scount, &rcount, &fcount);
+ CRYPTO_get_alloc_counts(&scount, &srcount, &fcount);
ADD_TEST(test_record_alloc_counts);
ADD_TEST(test_report_alloc_counts);
} else {
#include "testutil.h"
static char *certfile = NULL;
-static int mcount, rcount, fcount, scount;
+static int mcount, rcount, fcount, scount, srcount;
static int do_x509(int allow_failure)
{
CRYPTO_get_alloc_counts(&mcount, &rcount, &fcount);
/*
* Report our memory allocations from the count run
- * NOTE: We report a number of allocations to skip here
- * (the scount value). These are the allocations that took
- * place while the test harness itself was getting setup
- * (i.e. calling OPENSSL_init_crypto/etc). We can't fail
+ * NOTE: We report a number of (re)allocations to skip here
+ * (the scount + srcount value). These are the allocations
+ * that took place while the test harness itself was getting
+ * setup (i.e. calling OPENSSL_init_crypto/etc). We can't fail
* those allocations as they will cause the test to fail before
* we have even run the workload. So report them so we can
* allow them to function before we start doing any real testing
*/
- TEST_info("skip: %d count %d\n", scount, mcount - scount);
+ TEST_info("skip: %d count %d\n",
+ scount + srcount, mcount + rcount - scount - srcount);
return 1;
}
goto err;
if (strcmp(opmode, "count") == 0) {
- CRYPTO_get_alloc_counts(&scount, &rcount, &fcount);
+ CRYPTO_get_alloc_counts(&scount, &srcount, &fcount);
ADD_TEST(test_record_alloc_counts);
ADD_TEST(test_report_alloc_counts);
} else {