Re: TAP tests aren't using the magic words for Windows file access - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: TAP tests aren't using the magic words for Windows file access
Date
Msg-id CA+hUKGLr6Rv2zgEA-5EoEL+TCCOTgsvgTyZnziAZgkDfgHUdxA@mail.gmail.com
Whole thread Raw
In response to Re: TAP tests aren't using the magic words for Windows file access  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: TAP tests aren't using the magic words for Windows file access  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Thu, Nov 7, 2019 at 10:43 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> > Please find attached a patch that adds the FILE_SHARE options to
> > TestLib::slurp_file using Win32API::File.
>
> Ick.  Are we going to need Windows-droppings like this all over the
> TAP tests?  I'm not sure I believe that slurp_file is the only place
> with a problem.

Not a Windows or Perl person, but I see that you can redefine core
functions with *CORE::GLOBAL::open = <replacement/wrapper>, if you
wanted to make a version of open() that does that FILE_SHARE_READ
dance.  Alternatively we could of course have our own xxx_open()
function and use that everywhere, but that might be more distracting.

I'm a bit surprised that there doesn't seem to be a global switch
thing you can set somewhere to make it do that anyway.  Doesn't
everyone eventually figure out that all files really want to be
shared?



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: SKIP_LOCKED test causes random buildfarm failures
Next
From: Andres Freund
Date:
Subject: Re: question