pgsql: Fix pattern matching logic for logs in TAP tests of pgbench - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Date
Msg-id E1lwXJD-0005Ku-LB@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Bhavesh Mistry
Date:
Subject: Ubuntu 14.04 (trusty) Postgres 13 deb package
Next
From: Thomas Munro
Date:
Subject: Re: Ubuntu 14.04 (trusty) Postgres 13 deb package