summaryrefslogtreecommitdiff
path: root/test/thread
diff options
context:
space:
mode:
Diffstat (limited to 'test/thread')
-rw-r--r--test/thread/Makefile.am2
-rw-r--r--test/thread/rw.c12
-rw-r--r--test/thread/thread.h12
3 files changed, 6 insertions, 20 deletions
diff --git a/test/thread/Makefile.am b/test/thread/Makefile.am
index a58f019b513..ead783185f8 100644
--- a/test/thread/Makefile.am
+++ b/test/thread/Makefile.am
@@ -9,4 +9,4 @@ t_LDFLAGS = -static
TESTS = smoke.sh
clean-local:
- rm -rf WiredTiger* wt.* *.core __stats
+ rm -rf WT_TEST __stats *.core
diff --git a/test/thread/rw.c b/test/thread/rw.c
index 913fa6e6c25..10f13b9eb04 100644
--- a/test/thread/rw.c
+++ b/test/thread/rw.c
@@ -59,16 +59,13 @@ rw_start(u_int readers, u_int writers)
total_nops = 0;
/* Create per-thread structures. */
- if ((run_info = calloc(
- (size_t)(readers + writers), sizeof(*run_info))) == NULL ||
- (tids = calloc((size_t)(readers + writers), sizeof(*tids))) == NULL)
- testutil_die(errno, "calloc");
+ run_info = dcalloc((size_t)(readers + writers), sizeof(*run_info));
+ tids = dcalloc((size_t)(readers + writers), sizeof(*tids));
/* Create the files and load the initial records. */
for (i = 0; i < writers; ++i) {
if (i == 0 || multiple_files) {
- if ((run_info[i].name = malloc(64)) == NULL)
- testutil_die(errno, "malloc");
+ run_info[i].name = dmalloc(64);
snprintf(run_info[i].name, 64, FNAME, i);
/* Vary by orders of magnitude */
@@ -88,8 +85,7 @@ rw_start(u_int readers, u_int writers)
for (i = 0; i < readers; ++i) {
offset = i + writers;
if (multiple_files) {
- if ((run_info[offset].name = malloc(64)) == NULL)
- testutil_die(errno, "malloc");
+ run_info[offset].name = dmalloc(64);
/* Have readers read from tables with writes. */
name_index = i % writers;
snprintf(
diff --git a/test/thread/thread.h b/test/thread/thread.h
index 36cdbebd210..d5f0f42ea35 100644
--- a/test/thread/thread.h
+++ b/test/thread/thread.h
@@ -26,19 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <sys/types.h>
-#include <sys/time.h>
+#include "test_util.i"
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "test_util.i"
#define FNAME "file:wt.%03d" /* File name */
#define FNAME_STAT "__stats" /* File name for statistics */