pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove infinite-loop hazards in ecpg test suite.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Remove infinite-loop hazards in ecpg test suite.
@ 2019-01-24 21:47  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-01-24 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove infinite-loop hazards in ecpg test suite.

A report from Andrew Dunstan showed that an ecpglib breakage that
causes repeated query failures could lead to infinite loops in some
ecpg test scripts, because they contain "while(1)" loops with no
exit condition other than successful test completion.  That might
be all right for manual testing, but it seems entirely unacceptable
for automated test environments such as our buildfarm.  We don't
want buildfarm owners to have to intervene manually when a test
goes wrong.

To fix, just change all those while(1) loops to exit after at most
100 iterations (which is more than any of them expect to iterate).
This seems sufficient since we'd see discrepancies in the test output
if any loop executed the wrong number of times.

I tested this by dint of intentionally breaking ecpg_do_prologue
to always fail, and verifying that the tests still got to completion.

Back-patch to all supported branches, since the whole point of this
exercise is to protect the buildfarm against future mistakes.

Discussion: https://postgr.es/m/18693.1548302004@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/28868f77b6cb531fca376767c29c9767ac39f54b

Modified Files
--------------
src/interfaces/ecpg/test/compat_informix/test_informix.pgc     |  4 ++--
src/interfaces/ecpg/test/compat_oracle/char_array.pgc          |  4 ++--
.../ecpg/test/expected/compat_informix-test_informix.c         |  4 ++--
src/interfaces/ecpg/test/expected/compat_oracle-char_array.c   |  4 ++--
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c        | 10 +++++-----
src/interfaces/ecpg/test/expected/preproc-autoprep.c           |  2 +-
src/interfaces/ecpg/test/expected/preproc-outofscope.c         |  4 ++--
src/interfaces/ecpg/test/expected/preproc-variable.c           |  4 ++--
.../ecpg/test/expected/preproc-whenever_do_continue.c          |  7 +++++--
src/interfaces/ecpg/test/expected/sql-fetch.c                  |  8 ++++----
src/interfaces/ecpg/test/expected/sql-quote.c                  |  6 +++---
src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc               |  8 ++++----
src/interfaces/ecpg/test/preproc/autoprep.pgc                  |  2 +-
src/interfaces/ecpg/test/preproc/outofscope.pgc                |  4 ++--
src/interfaces/ecpg/test/preproc/variable.pgc                  |  4 ++--
src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc      |  4 ++--
src/interfaces/ecpg/test/sql/fetch.pgc                         |  6 +++---
src/interfaces/ecpg/test/sql/quote.pgc                         |  4 ++--
18 files changed, 46 insertions(+), 43 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Remove infinite-loop hazards in ecpg test suite.
@ 2019-01-24 21:47  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-01-24 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove infinite-loop hazards in ecpg test suite.

A report from Andrew Dunstan showed that an ecpglib breakage that
causes repeated query failures could lead to infinite loops in some
ecpg test scripts, because they contain "while(1)" loops with no
exit condition other than successful test completion.  That might
be all right for manual testing, but it seems entirely unacceptable
for automated test environments such as our buildfarm.  We don't
want buildfarm owners to have to intervene manually when a test
goes wrong.

To fix, just change all those while(1) loops to exit after at most
100 iterations (which is more than any of them expect to iterate).
This seems sufficient since we'd see discrepancies in the test output
if any loop executed the wrong number of times.

I tested this by dint of intentionally breaking ecpg_do_prologue
to always fail, and verifying that the tests still got to completion.

Back-patch to all supported branches, since the whole point of this
exercise is to protect the buildfarm against future mistakes.

Discussion: https://postgr.es/m/18693.1548302004@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fbf5395cb1ea8d1e53d830b90209b150b273692b

Modified Files
--------------
src/interfaces/ecpg/test/compat_informix/test_informix.pgc     |  4 ++--
.../ecpg/test/expected/compat_informix-test_informix.c         |  4 ++--
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c        | 10 +++++-----
src/interfaces/ecpg/test/expected/preproc-autoprep.c           |  2 +-
src/interfaces/ecpg/test/expected/preproc-outofscope.c         |  4 ++--
src/interfaces/ecpg/test/expected/preproc-variable.c           |  4 ++--
src/interfaces/ecpg/test/expected/sql-fetch.c                  |  8 ++++----
src/interfaces/ecpg/test/expected/sql-quote.c                  |  6 +++---
src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc               |  8 ++++----
src/interfaces/ecpg/test/preproc/autoprep.pgc                  |  2 +-
src/interfaces/ecpg/test/preproc/outofscope.pgc                |  4 ++--
src/interfaces/ecpg/test/preproc/variable.pgc                  |  4 ++--
src/interfaces/ecpg/test/sql/fetch.pgc                         |  6 +++---
src/interfaces/ecpg/test/sql/quote.pgc                         |  4 ++--
14 files changed, 35 insertions(+), 35 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Remove infinite-loop hazards in ecpg test suite.
@ 2019-01-24 21:47  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-01-24 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove infinite-loop hazards in ecpg test suite.

A report from Andrew Dunstan showed that an ecpglib breakage that
causes repeated query failures could lead to infinite loops in some
ecpg test scripts, because they contain "while(1)" loops with no
exit condition other than successful test completion.  That might
be all right for manual testing, but it seems entirely unacceptable
for automated test environments such as our buildfarm.  We don't
want buildfarm owners to have to intervene manually when a test
goes wrong.

To fix, just change all those while(1) loops to exit after at most
100 iterations (which is more than any of them expect to iterate).
This seems sufficient since we'd see discrepancies in the test output
if any loop executed the wrong number of times.

I tested this by dint of intentionally breaking ecpg_do_prologue
to always fail, and verifying that the tests still got to completion.

Back-patch to all supported branches, since the whole point of this
exercise is to protect the buildfarm against future mistakes.

Discussion: https://postgr.es/m/18693.1548302004@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/adc2553b7069abb46ea72a663eb0208f98bca29e

Modified Files
--------------
src/interfaces/ecpg/test/compat_informix/test_informix.pgc     |  4 ++--
.../ecpg/test/expected/compat_informix-test_informix.c         |  4 ++--
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c        | 10 +++++-----
src/interfaces/ecpg/test/expected/preproc-autoprep.c           |  2 +-
src/interfaces/ecpg/test/expected/preproc-outofscope.c         |  4 ++--
src/interfaces/ecpg/test/expected/preproc-variable.c           |  4 ++--
src/interfaces/ecpg/test/expected/sql-fetch.c                  |  8 ++++----
src/interfaces/ecpg/test/expected/sql-quote.c                  |  6 +++---
src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc               |  8 ++++----
src/interfaces/ecpg/test/preproc/autoprep.pgc                  |  2 +-
src/interfaces/ecpg/test/preproc/outofscope.pgc                |  4 ++--
src/interfaces/ecpg/test/preproc/variable.pgc                  |  4 ++--
src/interfaces/ecpg/test/sql/fetch.pgc                         |  6 +++---
src/interfaces/ecpg/test/sql/quote.pgc                         |  4 ++--
14 files changed, 35 insertions(+), 35 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Remove infinite-loop hazards in ecpg test suite.
@ 2019-01-24 21:47  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-01-24 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove infinite-loop hazards in ecpg test suite.

A report from Andrew Dunstan showed that an ecpglib breakage that
causes repeated query failures could lead to infinite loops in some
ecpg test scripts, because they contain "while(1)" loops with no
exit condition other than successful test completion.  That might
be all right for manual testing, but it seems entirely unacceptable
for automated test environments such as our buildfarm.  We don't
want buildfarm owners to have to intervene manually when a test
goes wrong.

To fix, just change all those while(1) loops to exit after at most
100 iterations (which is more than any of them expect to iterate).
This seems sufficient since we'd see discrepancies in the test output
if any loop executed the wrong number of times.

I tested this by dint of intentionally breaking ecpg_do_prologue
to always fail, and verifying that the tests still got to completion.

Back-patch to all supported branches, since the whole point of this
exercise is to protect the buildfarm against future mistakes.

Discussion: https://postgr.es/m/18693.1548302004@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d5a1fde397269bd60b99e70a4eb2934b75fd31ec

Modified Files
--------------
src/interfaces/ecpg/test/compat_informix/test_informix.pgc     |  4 ++--
src/interfaces/ecpg/test/compat_oracle/char_array.pgc          |  4 ++--
.../ecpg/test/expected/compat_informix-test_informix.c         |  4 ++--
src/interfaces/ecpg/test/expected/compat_oracle-char_array.c   |  4 ++--
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c        | 10 +++++-----
src/interfaces/ecpg/test/expected/preproc-autoprep.c           |  2 +-
src/interfaces/ecpg/test/expected/preproc-outofscope.c         |  4 ++--
src/interfaces/ecpg/test/expected/preproc-variable.c           |  4 ++--
.../ecpg/test/expected/preproc-whenever_do_continue.c          |  7 +++++--
src/interfaces/ecpg/test/expected/sql-fetch.c                  |  8 ++++----
src/interfaces/ecpg/test/expected/sql-quote.c                  |  6 +++---
src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc               |  8 ++++----
src/interfaces/ecpg/test/preproc/autoprep.pgc                  |  2 +-
src/interfaces/ecpg/test/preproc/outofscope.pgc                |  4 ++--
src/interfaces/ecpg/test/preproc/variable.pgc                  |  4 ++--
src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc      |  4 ++--
src/interfaces/ecpg/test/sql/fetch.pgc                         |  6 +++---
src/interfaces/ecpg/test/sql/quote.pgc                         |  4 ++--
18 files changed, 46 insertions(+), 43 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Remove infinite-loop hazards in ecpg test suite.
@ 2019-01-24 21:47  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-01-24 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove infinite-loop hazards in ecpg test suite.

A report from Andrew Dunstan showed that an ecpglib breakage that
causes repeated query failures could lead to infinite loops in some
ecpg test scripts, because they contain "while(1)" loops with no
exit condition other than successful test completion.  That might
be all right for manual testing, but it seems entirely unacceptable
for automated test environments such as our buildfarm.  We don't
want buildfarm owners to have to intervene manually when a test
goes wrong.

To fix, just change all those while(1) loops to exit after at most
100 iterations (which is more than any of them expect to iterate).
This seems sufficient since we'd see discrepancies in the test output
if any loop executed the wrong number of times.

I tested this by dint of intentionally breaking ecpg_do_prologue
to always fail, and verifying that the tests still got to completion.

Back-patch to all supported branches, since the whole point of this
exercise is to protect the buildfarm against future mistakes.

Discussion: https://postgr.es/m/18693.1548302004@sss.pgh.pa.us

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6d6333745b11530e46037fb5e2bbf357c0973dbd

Modified Files
--------------
src/interfaces/ecpg/test/compat_informix/test_informix.pgc     |  4 ++--
.../ecpg/test/expected/compat_informix-test_informix.c         |  4 ++--
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c        | 10 +++++-----
src/interfaces/ecpg/test/expected/preproc-autoprep.c           |  2 +-
src/interfaces/ecpg/test/expected/preproc-outofscope.c         |  4 ++--
src/interfaces/ecpg/test/expected/preproc-variable.c           |  4 ++--
src/interfaces/ecpg/test/expected/sql-fetch.c                  |  8 ++++----
src/interfaces/ecpg/test/expected/sql-quote.c                  |  6 +++---
src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc               |  8 ++++----
src/interfaces/ecpg/test/preproc/autoprep.pgc                  |  2 +-
src/interfaces/ecpg/test/preproc/outofscope.pgc                |  4 ++--
src/interfaces/ecpg/test/preproc/variable.pgc                  |  4 ++--
src/interfaces/ecpg/test/sql/fetch.pgc                         |  6 +++---
src/interfaces/ecpg/test/sql/quote.pgc                         |  4 ++--
14 files changed, 35 insertions(+), 35 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Remove infinite-loop hazards in ecpg test suite.
@ 2019-01-24 21:47  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-01-24 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove infinite-loop hazards in ecpg test suite.

A report from Andrew Dunstan showed that an ecpglib breakage that
causes repeated query failures could lead to infinite loops in some
ecpg test scripts, because they contain "while(1)" loops with no
exit condition other than successful test completion.  That might
be all right for manual testing, but it seems entirely unacceptable
for automated test environments such as our buildfarm.  We don't
want buildfarm owners to have to intervene manually when a test
goes wrong.

To fix, just change all those while(1) loops to exit after at most
100 iterations (which is more than any of them expect to iterate).
This seems sufficient since we'd see discrepancies in the test output
if any loop executed the wrong number of times.

I tested this by dint of intentionally breaking ecpg_do_prologue
to always fail, and verifying that the tests still got to completion.

Back-patch to all supported branches, since the whole point of this
exercise is to protect the buildfarm against future mistakes.

Discussion: https://postgr.es/m/18693.1548302004@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5b5cb3b0eb31e300ac4eaf616a6f83431531d57b

Modified Files
--------------
src/interfaces/ecpg/test/compat_informix/test_informix.pgc     |  4 ++--
.../ecpg/test/expected/compat_informix-test_informix.c         |  4 ++--
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c        | 10 +++++-----
src/interfaces/ecpg/test/expected/preproc-autoprep.c           |  2 +-
src/interfaces/ecpg/test/expected/preproc-outofscope.c         |  4 ++--
src/interfaces/ecpg/test/expected/preproc-variable.c           |  4 ++--
src/interfaces/ecpg/test/expected/sql-fetch.c                  |  8 ++++----
src/interfaces/ecpg/test/expected/sql-quote.c                  |  6 +++---
src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc               |  8 ++++----
src/interfaces/ecpg/test/preproc/autoprep.pgc                  |  2 +-
src/interfaces/ecpg/test/preproc/outofscope.pgc                |  4 ++--
src/interfaces/ecpg/test/preproc/variable.pgc                  |  4 ++--
src/interfaces/ecpg/test/sql/fetch.pgc                         |  6 +++---
src/interfaces/ecpg/test/sql/quote.pgc                         |  4 ++--
14 files changed, 35 insertions(+), 35 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2019-01-24 21:47 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 21:47 pgsql: Remove infinite-loop hazards in ecpg test suite. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-24 21:47 pgsql: Remove infinite-loop hazards in ecpg test suite. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-24 21:47 pgsql: Remove infinite-loop hazards in ecpg test suite. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-24 21:47 pgsql: Remove infinite-loop hazards in ecpg test suite. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-24 21:47 pgsql: Remove infinite-loop hazards in ecpg test suite. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-24 21:47 pgsql: Remove infinite-loop hazards in ecpg test suite. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox