diff options
Diffstat (limited to 'test/manydbs')
| -rw-r--r-- | test/manydbs/Makefile.am | 2 | ||||
| -rw-r--r-- | test/manydbs/manydbs.c | 32 |
2 files changed, 7 insertions, 27 deletions
diff --git a/test/manydbs/Makefile.am b/test/manydbs/Makefile.am index 53559b25243..d347868aa4f 100644 --- a/test/manydbs/Makefile.am +++ b/test/manydbs/Makefile.am @@ -10,4 +10,4 @@ t_LDFLAGS = -static TESTS = smoke.sh clean-local: - rm -rf WiredTiger* *.core __* + rm -rf WT_TEST *.core diff --git a/test/manydbs/manydbs.c b/test/manydbs/manydbs.c index 1d3412a7b06..4ab455f3620 100644 --- a/test/manydbs/manydbs.c +++ b/test/manydbs/manydbs.c @@ -26,22 +26,10 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <sys/wait.h> -#include <errno.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#ifndef _WIN32 -#include <unistd.h> -#endif - -#include <wiredtiger.h> - #include "test_util.i" #define HOME_SIZE 512 -#define HOME_BASE "WT_HOME" +#define HOME_BASE "WT_TEST" static char home[HOME_SIZE]; /* Base home directory */ static char hometmp[HOME_SIZE]; /* Each conn home directory */ static const char *progname; /* Program name */ @@ -172,17 +160,10 @@ main(int argc, char *argv[]) * Allocate arrays for connection handles, sessions, statistics * cursors and, if needed, data cursors. */ - if ((connections = calloc( - (size_t)dbs, sizeof(WT_CONNECTION *))) == NULL) - testutil_die(ENOMEM, "connection array malloc"); - if ((sessions = calloc( - (size_t)dbs, sizeof(WT_SESSION *))) == NULL) - testutil_die(ENOMEM, "session array malloc"); - if ((cond_reset_orig = calloc((size_t)dbs, sizeof(uint64_t))) == NULL) - testutil_die(ENOMEM, "orig stat malloc"); - if (!idle && ((cursors = calloc( - (size_t)dbs, sizeof(WT_CURSOR *))) == NULL)) - testutil_die(ENOMEM, "cursor array malloc"); + connections = dcalloc((size_t)dbs, sizeof(WT_CONNECTION *)); + sessions = dcalloc((size_t)dbs, sizeof(WT_SESSION *)); + cond_reset_orig = dcalloc((size_t)dbs, sizeof(uint64_t)); + cursors = idle ? NULL : dcalloc((size_t)dbs, sizeof(WT_CURSOR *)); memset(cmd, 0, sizeof(cmd)); /* * Set up all the directory names. @@ -257,8 +238,7 @@ main(int argc, char *argv[]) free(connections); free(sessions); free(cond_reset_orig); - if (!idle) - free(cursors); + free(cursors); return (EXIT_SUCCESS); } |
