v3-0001-Remove-dry-run-mode-from-isolationtester.patch
text/x-diff
Filename: v3-0001-Remove-dry-run-mode-from-isolationtester.patch
Type: text/x-diff
Part: 0
Patch
Format: format-patch
Series: patch v3-0001
Subject: Remove dry-run mode from isolationtester
| File | + | − |
|---|---|---|
| src/test/isolation/isolationtester.c | 1 | 30 |
From d0e756bba3668af0b1f40b0b1d5bf198b83a97fd Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@paquier.xyz>
Date: Thu, 22 Aug 2019 11:46:29 +0900
Subject: [PATCH v3 1/2] Remove dry-run mode from isolationtester
---
src/test/isolation/isolationtester.c | 31 +---------------------------
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
index f98bb1cf64..66ebe3b27e 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);
--
2.23.0