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

Commit834cb72

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 have 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.This is a backpatch of9903338 for 9.6~12. It is proving to becomeuseful to have on those branches so as the code gets consistent acrossall supported versions, as a matter of improving the output generated byisolationtester.Author: Michael PaquierReviewed-by: Asim Praveen, Melanie PlagemanDiscussion:https://postgr.es/m/20190819080820.GG18166@paquier.xyzDiscussion:https://postgr.es/m/794820.1623872009@sss.pgh.pa.usBackpatch-through: 9.6
1 parent9cf1632 commit834cb72

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
/* Maximum time to wait before giving up on a step (in usec) */
3835
staticint64max_step_wait=300*USECS_PER_SEC;
3936

@@ -83,13 +80,10 @@ main(int argc, char **argv)
8380
intnallsteps;
8481
Step**allsteps;
8582

86-
while ((opt=getopt(argc,argv,"nV"))!=-1)
83+
while ((opt=getopt(argc,argv,"V"))!=-1)
8784
{
8885
switch (opt)
8986
{
90-
case'n':
91-
dry_run= true;
92-
break;
9387
case'V':
9488
puts("isolationtester (PostgreSQL) "PG_VERSION);
9589
exit(0);
@@ -159,16 +153,6 @@ main(int argc, char **argv)
159153
}
160154
}
161155

162-
/*
163-
* In dry-run mode, just print the permutations that would be run, and
164-
* exit.
165-
*/
166-
if (dry_run)
167-
{
168-
run_testspec(testspec);
169-
return0;
170-
}
171-
172156
printf("Parsed test spec with %d sessions\n",testspec->nsessions);
173157

174158
/*
@@ -466,19 +450,6 @@ run_permutation(TestSpec *testspec, int nsteps, Step **steps)
466450
Step**waiting;
467451
Step**errorstep;
468452

469-
/*
470-
* In dry run mode, just display the permutation in the same format used
471-
* by spec files, and return.
472-
*/
473-
if (dry_run)
474-
{
475-
printf("permutation");
476-
for (i=0;i<nsteps;i++)
477-
printf(" \"%s\"",steps[i]->name);
478-
printf("\n");
479-
return;
480-
}
481-
482453
waiting=pg_malloc(sizeof(Step*)*testspec->nsessions);
483454
errorstep=pg_malloc(sizeof(Step*)*testspec->nsessions);
484455

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp