Re: TAP tests aren't using the magic words for Windows file access

From: r(dot)zharkov(at)postgrespro(dot)ru
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: TAP tests aren't using the magic words for Windows file access
Date: 2020-12-15 05:05:58
Message-ID: 1e63ff72bc9edc3c36a477d72f6beda9@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers,

Are there any plans to backport the patch to earlier versions
of the Postgres?
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=114541d58e5970e51b78b77b65de16210beaab43

We rarely see the issue with the pg_ctl/004_logrotate test on
the REL_12_STABLE branch. On my notebook I can easily reproduce
the "Permission denied at src/test/perl/TestLib.pm line 259"
error with the small change below. But the same test on the
13th version and the 12th version with the TestLib patch does
not fail.

diff --git a/src/bin/pg_ctl/t/004_logrotate.pl
b/src/bin/pg_ctl/t/004_logrotate.pl

index bc39abd23e4..e49e159bc84 100644

---
a/src/bin/pg_ctl/t/004_logrotate.pl

+++
b/src/bin/pg_ctl/t/004_logrotate.pl

@@ -72,7 +72,7 @@ for (my
$attempts = 0; $attempts < $max_attempts; $attempts++)

{


$new_current_logfiles = slurp_file($node->data_dir .
'/current_logfiles');
last
if $new_current_logfiles ne $current_logfiles;

- usleep(100_000);


+ usleep(1);

}





note "now current_logfiles = $new_current_logfiles";

On 2019-11-22 20:22, Andrew Dunstan wrote:
> On 11/22/19 3:55 AM, Juan José Santamaría Flecha wrote:
>>
>> On Fri, Nov 22, 2019 at 9:00 AM Michael Paquier <michael(at)paquier(dot)xyz
>> <mailto:michael(at)paquier(dot)xyz>> wrote:
>>
>> On Thu, Nov 21, 2019 at 08:09:38PM +0100, Juan José Santamaría
>> Flecha wrote:
>> > I think Perl's open() is a bad candidate for an overload, so I
>> will update
>> > the previous patch that only touches slurp_file().
>>
>> FWIW, I don't like much the approach of patching only
>> slurp_file().
>> What gives us the guarantee that we won't have this discussion
>> again
>> in a couple of months or years once a new caller of open() is
>> added
>> for some new TAP tests, and that it has the same problems with
>> multi-process concurrency?
>>
>>
>> I agree on that, from a technical stand point, overloading open() is
>> probably the best solution for the reasons above mentioned. My doubts
>> come from the effort such a solution will take and its
>> maintainability, also taking into account that there are not that many
>> calls to open() in "src/test/perl".
>>
>>
>
>
> I think the best course is for us to give your latest patch an outing
> on
> the buildfarm and verify that the issues seen with slurp_file
> disappear.
> That shouldn't take us more than a week or two to see - drongo has had
> 6
> such failures in the last 11 days on master. After that we can discuss
> how much further we might want to take it.
>
>
> cheers
>
>
> andrew

--
regards,

Roman Zharkov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-12-15 05:20:33 Re: Proposed patch for key managment
Previous Message Bruce Momjian 2020-12-15 04:16:18 Re: Proposed patch for key managment