From: Michael Paquier <michael@paquier.xyz>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: pgsql-committers@lists.postgresql.org, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
Date: Sun, 27 Jun 2021 10:22:24 +0900
Message-ID: <YNfS0FB8XFbKlsbt@paquier.xyz> (raw)
In-Reply-To: <9f70b570-9aa2-29cc-8732-34cc6d16d798@dunslane.net>
References: <E1lwXJD-0005Kn-Jy@gemulon.postgresql.org>
<YNUad2HvgW+6eXyo@paquier.xyz>
<YNUirR5z+0xYjiu9@paquier.xyz>
<e5cd9952-bbe8-958c-8606-5af59d622745@dunslane.net>
<YNU3Nzp1cONhdC1r@paquier.xyz>
<0f49303e-7784-b3ee-200b-cbf67be2eb9e@dunslane.net>
<alpine.DEB.2.22.394.2106260817090.482873@pseudo>
<9f70b570-9aa2-29cc-8732-34cc6d16d798@dunslane.net>
On Sat, Jun 26, 2021 at 11:01:07AM -0400, Andrew Dunstan wrote:
> On 6/26/21 2:47 AM, Fabien COELHO wrote:
>> However, if slurp_file fails it raises an exception and aborts the
>> whole TAP unexpectedly, which is pretty unclean. So I'd suggest to
>> keep the eval, as attached. I tested it by changing the file name so
>> that the slurp fails.
>
> Seem quite unnecessary. We haven't found that to be an issue elsewhere
> in the code where slurp_file is used. And in the present case we know
> the file exists because we got its name from list_files().
Agreed. That's an exchange between a hard failure mid-test and a
failure while letting the whole test run. Here, we expect the test to
find the log file all the time, so a hard failure does not sound like
a bad thing to me either.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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, andrew@dunslane.net, coelho@cri.ensmp.fr, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench
In-Reply-To: <YNfS0FB8XFbKlsbt@paquier.xyz>
References: <E1lwXJD-0005Kn-Jy@gemulon.postgresql.org> <YNUad2HvgW+6eXyo@paquier.xyz> <YNUirR5z+0xYjiu9@paquier.xyz> <e5cd9952-bbe8-958c-8606-5af59d622745@dunslane.net> <YNU3Nzp1cONhdC1r@paquier.xyz> <0f49303e-7784-b3ee-200b-cbf67be2eb9e@dunslane.net> <alpine.DEB.2.22.394.2106260817090.482873@pseudo> <9f70b570-9aa2-29cc-8732-34cc6d16d798@dunslane.net> <YNfS0FB8XFbKlsbt@paquier.xyz>
* 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