summaryrefslogtreecommitdiff
path: root/test/recovery
diff options
context:
space:
mode:
Diffstat (limited to 'test/recovery')
-rw-r--r--test/recovery/random-abort.c17
-rw-r--r--test/recovery/truncated-log.c4
2 files changed, 9 insertions, 12 deletions
diff --git a/test/recovery/random-abort.c b/test/recovery/random-abort.c
index a6e4d9801e5..660ef0cca67 100644
--- a/test/recovery/random-abort.c
+++ b/test/recovery/random-abort.c
@@ -31,7 +31,7 @@
#include <sys/wait.h>
#include <signal.h>
-static char home[512]; /* Program working dir */
+static char home[1024]; /* Program working dir */
static const char *progname; /* Program name */
/*
* These two names for the URI and file system must be maintained in tandem.
@@ -227,7 +227,7 @@ main(int argc, char *argv[])
pid_t pid;
bool fatal, rand_th, rand_time, verify_only;
const char *working_dir;
- char fname[64], kname[64];
+ char fname[64], kname[64], statname[1024];
if ((progname = strrchr(argv[0], DIR_DELIM)) == NULL)
progname = argv[0];
@@ -268,7 +268,7 @@ main(int argc, char *argv[])
if (argc != 0)
usage();
- testutil_work_dir_from_path(home, 512, working_dir);
+ testutil_work_dir_from_path(home, sizeof(home), working_dir);
/*
* If the user wants to verify they need to tell us how many threads
* there were so we can find the old record files.
@@ -316,8 +316,8 @@ main(int argc, char *argv[])
* still exists in case the child aborts for some reason we
* don't stay in this loop forever.
*/
- snprintf(fname, sizeof(fname), "%s/%s", home, fs_main);
- while (stat(fname, &sb) != 0 && kill(pid, 0) == 0)
+ snprintf(statname, sizeof(statname), "%s/%s", home, fs_main);
+ while (stat(statname, &sb) != 0 && kill(pid, 0) == 0)
sleep(1);
sleep(timeout);
@@ -352,11 +352,8 @@ main(int argc, char *argv[])
for (i = 0; i < nth; ++i) {
middle = 0;
snprintf(fname, sizeof(fname), RECORDS_FILE, i);
- if ((fp = fopen(fname, "r")) == NULL) {
- fprintf(stderr,
- "Failed to open %s. i %" PRIu32 "\n", fname, i);
- testutil_die(errno, "fopen");
- }
+ if ((fp = fopen(fname, "r")) == NULL)
+ testutil_die(errno, "fopen: %s", fname);
/*
* For every key in the saved file, verify that the key exists
diff --git a/test/recovery/truncated-log.c b/test/recovery/truncated-log.c
index c265263d44c..6a142b8e710 100644
--- a/test/recovery/truncated-log.c
+++ b/test/recovery/truncated-log.c
@@ -35,7 +35,7 @@
#define snprintf _snprintf
#endif
-static char home[512]; /* Program working dir */
+static char home[1024]; /* Program working dir */
static const char *progname; /* Program name */
static const char * const uri = "table:main";
@@ -290,7 +290,7 @@ main(int argc, char *argv[])
if (argc != 0)
usage();
- testutil_work_dir_from_path(home, 512, working_dir);
+ testutil_work_dir_from_path(home, sizeof(home), working_dir);
testutil_make_work_dir(home);
/*