diff options
author | Michael Paquier | 2019-08-24 02:35:43 +0000 |
---|---|---|
committer | Michael Paquier | 2019-08-24 02:35:43 +0000 |
commit | 9903338b5ea59093d77cfe50ec0b1c22d4a7d843 (patch) | |
tree | 18366cd643fb95421ad15744b14514430a8f7ee8 /src/test/isolation/isolationtester.c | |
parent | 292ae8af79b4f1b09a327d39e80ef70943a28194 (diff) |
Remove dry-run mode from isolationtester
The original purpose of the dry-run mode is to be able to print all the
possible permutations from a spec file, but it has become less useful
since isolation tests has improved regarding deadlock detection as one
step not wanted by the author could block indefinitely now (originally
the step blocked would have been detected rather quickly). Per
discussion, let's remove it.
Author: Michael Paquier
Reviewed-by: Asim Praveen, Melanie Plageman
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/test/isolation/isolationtester.c')
-rw-r--r-- | src/test/isolation/isolationtester.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c index f98bb1cf64b..66ebe3b27e9 100644 --- a/src/test/isolation/isolationtester.c +++ b/src/test/isolation/isolationtester.c @@ -31,9 +31,6 @@ static int *backend_pids = NULL; static const char **backend_pid_strs = NULL; static int nconns = 0; -/* In dry run only output permutations to be run by the tester. */ -static int dry_run = false; - static void run_testspec(TestSpec *testspec); static void run_all_permutations(TestSpec *testspec); static void run_all_permutations_recurse(TestSpec *testspec, int nsteps, @@ -76,13 +73,10 @@ main(int argc, char **argv) int nallsteps; Step **allsteps; - while ((opt = getopt(argc, argv, "nV")) != -1) + while ((opt = getopt(argc, argv, "V")) != -1) { switch (opt) { - case 'n': - dry_run = true; - break; case 'V': puts("isolationtester (PostgreSQL) " PG_VERSION); exit(0); @@ -144,16 +138,6 @@ main(int argc, char **argv) } } - /* - * In dry-run mode, just print the permutations that would be run, and - * exit. - */ - if (dry_run) - { - run_testspec(testspec); - return 0; - } - printf("Parsed test spec with %d sessions\n", testspec->nsessions); /* @@ -449,19 +433,6 @@ run_permutation(TestSpec *testspec, int nsteps, Step **steps) Step **waiting; Step **errorstep; - /* - * In dry run mode, just display the permutation in the same format used - * by spec files, and return. - */ - if (dry_run) - { - printf("permutation"); - for (i = 0; i < nsteps; i++) - printf(" \"%s\"", steps[i]->name); - printf("\n"); - return; - } - waiting = pg_malloc(sizeof(Step *) * testspec->nsessions); errorstep = pg_malloc(sizeof(Step *) * testspec->nsessions); |