Fix bogus list-iteration code in pg_regress.c, affecting ecpg tests only.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d86e9e21058cfd53f0b6a3cabee68446aa255775
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-04-30T01:56:27Z
Releases: 10.4
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 wondered
why the pg_regress output claimed the stderr part of the test failed, when
the regression diffs were clearly for the stdout part.  Looking into it,
the reason is that pg_regress.c's logic for iterating over three parallel
lists 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.

Files

PathChange+/−
src/test/regress/pg_regress.c modified +4 −10