pgsql: Detect unused steps in isolation specs and do some cleanup

Started by Michael Paquieralmost 7 years ago3 messagescomitters
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Detect unused steps in isolation specs and do some cleanup

This is useful for developers to find out if an isolation spec is
over-engineered or if it needs more work by warning at the end of a
test run if a step is not used, generating a failure with extra diffs.

While on it, clean up all the specs which include steps not used in any
permutations to simplify them.

Author: Michael Paquier
Reviewed-by: Asim Praveen, Melanie Plageman
Discussion: /messages/by-id/20190819080820.GG18166@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/989d23b04beac0c26f44c379b04ac781eaa4265e

Modified Files
--------------
src/test/isolation/isolationtester.c | 19 ++++++++++++++++++-
src/test/isolation/isolationtester.h | 1 +
src/test/isolation/specparse.y | 1 +
src/test/isolation/specs/freeze-the-dead.spec | 3 ---
.../isolation/specs/insert-conflict-do-nothing.spec | 1 -
.../isolation/specs/insert-conflict-do-update-2.spec | 1 -
.../isolation/specs/insert-conflict-do-update.spec | 1 -
src/test/isolation/specs/sequence-ddl.spec | 1 -
.../specs/tuplelock-upgrade-no-deadlock.spec | 3 ---
9 files changed, 20 insertions(+), 11 deletions(-)

#2Stephen Frost
sfrost@snowman.net
In reply to: Michael Paquier (#1)
Re: pgsql: Detect unused steps in isolation specs and do some cleanup

Greetings,

* Michael Paquier (michael@paquier.xyz) wrote:

Detect unused steps in isolation specs and do some cleanup

This is useful for developers to find out if an isolation spec is
over-engineered or if it needs more work by warning at the end of a
test run if a step is not used, generating a failure with extra diffs.

While on it, clean up all the specs which include steps not used in any
permutations to simplify them.

Buildfarm didn't particularly like this.

Thanks,

Stephen

#3Michael Paquier
michael@paquier.xyz
In reply to: Stephen Frost (#2)
Re: pgsql: Detect unused steps in isolation specs and do some cleanup

On Fri, Aug 23, 2019 at 11:07:49PM -0400, Stephen Frost wrote:

Buildfarm didn't particularly like this.

Thanks, I have noticed that. The problem should be fixed now thanks
to 06fdc4e.
--
Michael