]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix pattern matching logic for logs in TAP tests of pgbench
authorMichael Paquier <michael@paquier.xyz>
Thu, 24 Jun 2021 21:52:56 +0000 (06:52 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 24 Jun 2021 21:52:56 +0000 (06:52 +0900)
commit0efd2a1a66dd6e27b097ad533311d8e1ad7ca309
treeaee2fde486be54bc5d5c467f85df675f6a63f18e
parentc6cb62f6137efb67283798b6f8ebc211ff803427
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
src/bin/pgbench/t/001_pgbench_with_server.pl