summaryrefslogtreecommitdiff
path: root/test/fops
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-06-04 16:19:27 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-06-04 16:19:27 +1000
commit4f05e1298898d51febaeaa3ab9e20de4bb2babf8 (patch)
tree497c03035fd73a68a68efb9040a1aee00645519a /test/fops
parent00088cccba90f66cee108794a0ff3ce7a6507c01 (diff)
downloadmongo-4f05e1298898d51febaeaa3ab9e20de4bb2babf8.tar.gz
Fix races in table-level schema operations.
closes #191
Diffstat (limited to 'test/fops')
-rw-r--r--test/fops/t.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/test/fops/t.c b/test/fops/t.c
index 468c982cad9..ad1d7811771 100644
--- a/test/fops/t.c
+++ b/test/fops/t.c
@@ -28,6 +28,7 @@ main(int argc, char *argv[])
u_int nthreads;
int ch, cnt, runs;
char *config_open;
+ const char **objp, *objs[] = { "file:__wt", "table:__wt", NULL };
if ((progname = strrchr(argv[0], '/')) == NULL)
progname = argv[0];
@@ -76,21 +77,15 @@ main(int argc, char *argv[])
for (cnt = 1; runs == 0 || cnt <= runs; ++cnt) {
shutdown(); /* Clean up previous runs */
- uri = "file:__wt";
- printf(" %d: %u threads on %s\n", cnt, nthreads, uri);
- wt_startup(config_open);
- if (fop_start(nthreads))
- return (EXIT_FAILURE);
- wt_shutdown();
- printf("\n");
-
- uri = "table:__wt";
- printf(" %d: %u threads on %s\n", cnt, nthreads, uri);
- wt_startup(config_open);
- if (fop_start(nthreads))
- return (EXIT_FAILURE);
- wt_shutdown();
- printf("\n");
+ for (objp = objs; *objp != NULL; objp++) {
+ uri = *objp;
+ printf("%5d: %u threads on %s\n", cnt, nthreads, uri);
+ wt_startup(config_open);
+ if (fop_start(nthreads))
+ return (EXIT_FAILURE);
+ wt_shutdown();
+ printf("\n");
+ }
}
return (0);
}