pgsql: Test stabilization for online checksums - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Test stabilization for online checksums
Date
Msg-id E1w9XT8-0039Ze-19@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Test stabilization for online checksums

Postcommit review and buildfarm/CI failures revealed a few issues in
the test code which this commit attempts to resolve.  These failures
are verified using synthetic means.

  * Wait for launcher exit in enable/disable checksum tests

    When enabling or disabling data checksums in a test with waiting
    for an end state (on or off), the test typically want to perform
    more test against the cluster immediately. Make sure to wait for
    the launcher to exit in these cases before returning in order to
    know it can immediately be acted on.  This is a more generic way
    of implementating 0036232ba8f.

  * Refactor injection point tests to use the injection_points test
    extension. Two injection points added for online checksums were
    better expressed using the injection_points extension with the
    test code embedded in datachecksum_state.c.

  * Make tests less timing dependent and allow transitions to "on"
    and not just "inprogress-on" in case a test manages to finish
    before it's checked for state.

  * When waiting on a blocking background psql keeping a temporary
    table open, the test first closed the background session abd
    then the server.  This could cause data checksums to manage to
    get enabled in the brief window between dropping the temporary
    table and closing the server.  Fix by closing the server first
    before the background session.

  * Remove a few superfluous duplicate checks and general cleanup
    of comments as well as making LSN logging consistent.

These issues were reported by Andres as well as spotted in the
buildfarm and on CI.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/92F25C14-801E-4198-994D-D83E31FEB0D8@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07009121c235dc1b9338b57b6a85006a5e3b0bd8

Modified Files
--------------
src/backend/postmaster/datachecksum_state.c        | 26 ++++++-
src/test/modules/test_checksums/t/001_basic.pl     |  6 +-
.../test_checksums/t/003_standby_restarts.pl       | 14 ++--
src/test/modules/test_checksums/t/004_offline.pl   |  8 ++-
src/test/modules/test_checksums/t/005_injection.pl | 12 +++-
.../modules/test_checksums/t/006_pgbench_single.pl | 16 ++++-
.../test_checksums/t/007_pgbench_standby.pl        | 19 ++++--
src/test/modules/test_checksums/t/008_pitr.pl      |  8 +--
.../test_checksums/t/DataChecksums/Utils.pm        | 24 ++++++-
.../modules/test_checksums/test_checksums--1.0.sql |  8 ---
src/test/modules/test_checksums/test_checksums.c   | 79 ----------------------
11 files changed, 101 insertions(+), 119 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add tests for lock statistics, take two
Next
From: John Naylor
Date:
Subject: pgsql: Fix unportable use of __builtin_constant_p