pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Date: Thu, 24 Jun 2021 21:54:51 +0000
Message-ID: <E1lwXJD-0005Ku-LB@gemulon.postgresql.org> (raw)

Fix pattern matching logic for logs in TAP tests of pgbench

The logic checking for the format of per-thread logs used grep() with
directly "$re", which would cause the test to consider all the logs as
a match without caring about their format at all.  Using "/$re/" makes
grep() perform a regex test, which is what we want here.

While on it, improve some of the tests to be more picky with the
patterns expected and add more comments to describe the tests.

Issue discovered while digging into a separate patch.

Author: Fabien Coelho, Michael Paquier
Discussion: https://postgr.es/m/YNPsPAUoVDCpPOGk@paquier.xyz
Backpatch-through: 11

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0efd2a1a66dd6e27b097ad533311d8e1ad7ca309

Modified Files
--------------
src/bin/pgbench/t/001_pgbench_with_server.pl | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)



view thread (18+ messages)  latest in thread

Message-ID: <E1lwXJD-0005Ku-LB@gemulon.postgresql.org>
Permalink:  ../E1lwXJD-0005Ku-LB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lwXJD-0005Ku-LB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
  In-Reply-To: <E1lwXJD-0005Ku-LB@gemulon.postgresql.org>
  References: <E1lwXJD-0005Ku-LB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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