Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jibSr-0008NR-BG for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2020 10:26:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jibSq-0007FF-6j for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2020 10:26:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jibSn-00079b-RY for pgsql-hackers@lists.postgresql.org; Tue, 09 Jun 2020 10:26:39 +0000 Received: from [64.147.123.20] (helo=wout4-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jibSk-0004Pg-Nz for pgsql-hackers@postgresql.org; Tue, 09 Jun 2020 10:26:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id E549B7F3; Tue, 9 Jun 2020 06:26:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 09 Jun 2020 06:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm2; bh= hmrfPLGXuIWNjiJMONEY5YR4ANrZAzTrqo8UFa4IHqk=; b=Mz+u78smA2UCBu30 6bSb97CZMgnPaqjdXlRmjAPd/hJjljAg7KFdr5Ds2AI1G8a7j6APZf4un6RSEFAV WcRtQ282E5Ez1ztXdNsgpaRlq6sstlOoX1wiUHv/AI4LuXy69cOFjwCikuSlB2HJ hkROr/J/vltw2GVnupRXy/NyeHFcbei6xS6ZIW2KUpcwGx8Z1E+2jjvH9Km027pm FFglXcCCHfb1sNHySywaTQmXabvnrY/qZTCoeLk/okLyh4BE4TvLdXQUKpqqY5Ji DhTi6BavXiVpWoP471kt3129k3Dsjb2AmEs9dQXRooCPz2dC7YR9YkfPPBszju2i K5DOdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=hmrfPLGXuIWNjiJMONEY5YR4ANrZAzTrqo8UFa4IH qk=; b=V+hIWB4bcPvJbeAPyildHxmau098W0JGtCxpr/Kg/51KQID42U+Rh6H8N f82KD1kI3oeS+GHi6uBquasKUrFd64RK/Xn22Uq6UUkB9NLt+Pf9R+sKO5i3l/8j JfbhiyNLjEv2OZbVbNWC9PFpUVZt3FgInKlFsGuX73Hv8mUrDAsiKLd7UBWPGTiS xtzp7py54mHHOU/HZ2qv6JK1fatVgO1gYLd3QMcucCGcphbFug3aVkfrm8FbNqzy RtLS/R1ONXGIsWtZT9NTP07SDdCPIGRhCokxyGZPMyGZhpaLrGTb/uAvAbRNS32j wzfeEX8H3c2fKBbDcCCcREUl0YJPg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudehgedgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomhepihhlmhgr rhhisehilhhmrghrihdrohhrghculdffrghgfhhinhhnucfklhhmrghrihcuofgrnhhnsh onkhgvrhdmnecuggftrfgrthhtvghrnhepfefggeetvefguedthffggfejtddtfeejiefg ueejgefhjeehhffghfejledufeffnecuffhomhgrihhnpehmvghtrggtphgrnhdrohhrgh enucfkphepgeeirdegfedrudehrddvhedvnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Received: from wibble.ilmari.org (wibble.ilmari.org [46.43.15.252]) by mail.messagingengine.com (Postfix) with ESMTPA id 79B2930618C1; Tue, 9 Jun 2020 06:26:21 -0400 (EDT) From: ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) To: Juan =?utf-8?Q?Jos=C3=A9_Santamar=C3=ADa_Flecha?= Cc: Peter Eisentraut , Michael Paquier , pgsql-hackers Subject: Re: TAP tests and symlinks on Windows References: <20200609071931.GE38342@paquier.xyz> <89a38304-8900-2e6b-de26-19a0312f3a87@2ndquadrant.com> Date: Tue, 09 Jun 2020 11:26:19 +0100 In-Reply-To: ("Juan =?utf-8?Q?Jos=C3=A9_Santamar=C3=ADa?= Flecha"'s message of "Tue, 9 Jun 2020 09:33:32 +0200") Message-ID: <87sgf4pmb8.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.20 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Juan José Santamaría Flecha writes: > On Tue, Jun 9, 2020 at 9:28 AM Peter Eisentraut < > peter.eisentraut@2ndquadrant.com> wrote: > >> On 2020-06-09 09:19, Michael Paquier wrote: >> > On Mon, Jun 08, 2020 at 02:44:31PM +0200, Peter Eisentraut wrote: >> >> both contain a TAP skip notice "symlinks not supported on Windows". >> >> >> >> This is untrue. Symlinks certainly work on Windows, and we have other >> TAP >> >> tests using them, for example for tablespaces. >> > >> >> pg_rewind/t/004_pg_xlog_symlink.pl passes for me on Windows if I just >> remove >> >> the skip stuff. My attached patch does that. >> > >> > What's the version of your perl installation on Windows? With 5.22, I >> > am still seeing that symlink() is not implemented, causing the tests >> > of pg_rewind to blow in flight with your patch (MSVC 2015 here). >> >> I was using MSYS2 and the Perl version appears to have been 5.30.2. >> Note sure which one of these two factors makes the difference. >> > > The difference seems to be MSYS2, it also fails for me if I do not > include 'Win32::Symlink' with Perl 5.30.2. Amusingly, Win32::Symlink uses a copy of our pgsymlink(), which emulates symlinks via junction points: https://metacpan.org/source/AUDREYT/Win32-Symlink-0.06/pgsymlink.c A portable way of using symlinks if possible would be: # In a BEGIN block because it overrides CORE::GLOBAL::symlink, which # only takes effect on code that's compiled after the override is # installed. We don't care if it fails, since it works without on # some Windows perls. BEGIN { eval { require Win32::Symlink; Win32::Symlink->import; } } # symlink() throws an exception if t if (not eval { symlink("",""); 1; }) { plan skip_all => 'symlinks not supported'; } else { plan tests => 5; } Plus a note in the Win32 docs that Win32::Symlink may be required to run some tests on some Perl/Windows versions.. - ilmari -- - Twitter seems more influential [than blogs] in the 'gets reported in the mainstream press' sense at least. - Matt McLeod - That'd be because the content of a tweet is easier to condense down to a mainstream media article. - Calle Dybedahl