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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Date: 2021-06-24 23:51:19
Message-ID: YNUad2HvgW+6eXyo@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Jun 24, 2021 at 09:54:51PM +0000, Michael Paquier wrote:
> 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.

fairywren does not like that:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-06-24%2022%3A36%3A14

not ok 302 - transaction format for 001_pgbench_log_2
not ok 311 - transaction format for 001_pgbench_log_3

I am not sure if this is a pre-existing bug in pgbench itself
regarding the way we generate the logs or an issue with fairywren's
perl installation.

Andrew, what's the format of the per-thread logs generated on this
host when running the commands? I'd bet that the checks for the
client IDs are right, but that some parts of the regex are too picky
when it comes to this host.
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-06-25 00:26:21 Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Previous Message Michael Paquier 2021-06-24 23:43:13 pgsql: doc: Move remove_temp_files_after_crash to section for developer

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-06-25 00:26:21 Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Previous Message Michael Paquier 2021-06-24 23:43:45 Re: cleanup temporary files after crash