Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9903338

Browse files
committed
Remove dry-run mode from isolationtester
The original purpose of the dry-run mode is to be able to print all thepossible permutations from a spec file, but it has become less usefulsince isolation tests has improved regarding deadlock detection as onestep not wanted by the author could block indefinitely now (originallythe step blocked would have been detected rather quickly). Perdiscussion, let's remove it.Author: Michael PaquierReviewed-by: Asim Praveen, Melanie PlagemanDiscussion:https://postgr.es/m/20190819080820.GG18166@paquier.xyz
1 parent292ae8a commit9903338

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

‎src/test/isolation/isolationtester.c

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ static int *backend_pids = NULL;
3131
staticconstchar**backend_pid_strs=NULL;
3232
staticintnconns=0;
3333

34-
/* In dry run only output permutations to be run by the tester. */
35-
staticintdry_run= false;
36-
3734
staticvoidrun_testspec(TestSpec*testspec);
3835
staticvoidrun_all_permutations(TestSpec*testspec);
3936
staticvoidrun_all_permutations_recurse(TestSpec*testspec,intnsteps,
@@ -76,13 +73,10 @@ main(int argc, char **argv)
7673
intnallsteps;
7774
Step**allsteps;
7875

79-
while ((opt=getopt(argc,argv,"nV"))!=-1)
76+
while ((opt=getopt(argc,argv,"V"))!=-1)
8077
{
8178
switch (opt)
8279
{
83-
case'n':
84-
dry_run= true;
85-
break;
8680
case'V':
8781
puts("isolationtester (PostgreSQL) "PG_VERSION);
8882
exit(0);
@@ -144,16 +138,6 @@ main(int argc, char **argv)
144138
}
145139
}
146140

147-
/*
148-
* In dry-run mode, just print the permutations that would be run, and
149-
* exit.
150-
*/
151-
if (dry_run)
152-
{
153-
run_testspec(testspec);
154-
return0;
155-
}
156-
157141
printf("Parsed test spec with %d sessions\n",testspec->nsessions);
158142

159143
/*
@@ -449,19 +433,6 @@ run_permutation(TestSpec *testspec, int nsteps, Step **steps)
449433
Step**waiting;
450434
Step**errorstep;
451435

452-
/*
453-
* In dry run mode, just display the permutation in the same format used
454-
* by spec files, and return.
455-
*/
456-
if (dry_run)
457-
{
458-
printf("permutation");
459-
for (i=0;i<nsteps;i++)
460-
printf(" \"%s\"",steps[i]->name);
461-
printf("\n");
462-
return;
463-
}
464-
465436
waiting=pg_malloc(sizeof(Step*)*testspec->nsessions);
466437
errorstep=pg_malloc(sizeof(Step*)*testspec->nsessions);
467438

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp