pgsql: Fix pattern matching logic for logs in TAP tests of pgbench

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Дата
Msg-id E1lwXJD-0005Kr-Km@gemulon.postgresql.org
обсуждение исходный текст
Список 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_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/79ff96aa9d9a76cf6fd5ade9a25efb488ecd89ab

Modified Files
--------------
src/bin/pgbench/t/001_pgbench_with_server.pl | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Bhavesh Mistry
Дата:
Сообщение: Ubuntu 14.04 (trusty) Postgres 13 deb package
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Ubuntu 14.04 (trusty) Postgres 13 deb package