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

Commitc5e46c7

Browse files
committed
Fix bogus list-iteration code in pg_regress.c, affecting ecpg tests only.
While looking at a recent buildfarm failure in the ecpg tests, I wonderedwhy the pg_regress output claimed the stderr part of the test failed, whenthe regression diffs were clearly for the stdout part. Looking into it,the reason is that pg_regress.c's logic for iterating over three parallellists is wrong, and has been wrong since it was written: it advances the"tag" pointer at a different place in the loop than the other two pointers.Fix that.
1 parenteb16011 commitc5e46c7

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,14 +1752,11 @@ run_schedule(const char *schedule, test_function tfunc)
17521752
*/
17531753
for (rl=resultfiles[i],el=expectfiles[i],tl=tags[i];
17541754
rl!=NULL;/* rl and el have the same length */
1755-
rl=rl->next,el=el->next)
1755+
rl=rl->next,el=el->next,
1756+
tl=tl ?tl->next :NULL)
17561757
{
17571758
boolnewdiff;
17581759

1759-
if (tl)
1760-
tl=tl->next;/* tl has the same length as rl and el if
1761-
* it exists */
1762-
17631760
newdiff=results_differ(tests[i],rl->str,el->str);
17641761
if (newdiff&&tl)
17651762
{
@@ -1848,14 +1845,11 @@ run_single_test(const char *test, test_function tfunc)
18481845
*/
18491846
for (rl=resultfiles,el=expectfiles,tl=tags;
18501847
rl!=NULL;/* rl and el have the same length */
1851-
rl=rl->next,el=el->next)
1848+
rl=rl->next,el=el->next,
1849+
tl=tl ?tl->next :NULL)
18521850
{
18531851
boolnewdiff;
18541852

1855-
if (tl)
1856-
tl=tl->next;/* tl has the same length as rl and el if it
1857-
* exists */
1858-
18591853
newdiff=results_differ(test,rl->str,el->str);
18601854
if (newdiff&&tl)
18611855
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp