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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, 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: 2019-11-06 22:13:32
Message-ID: CA+hUKGLr6Rv2zgEA-5EoEL+TCCOTgsvgTyZnziAZgkDfgHUdxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 7, 2019 at 10:43 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo(dot)santamaria(at)gmail(dot)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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-11-06 22:51:16 Re: question
Previous Message Tom Lane 2019-11-06 21:54:38 SKIP_LOCKED test causes random buildfarm failures