Re: TAP tests and symlinks on Windows

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>, Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-06-26T12:00:37Z
Lists: pgsql-hackers
On 2020-06-23 12:55, Michael Paquier wrote:
> I have implemented a patch based on the feedback received that does
> the following, tested with all three patterns (MSVC only on Windows):
> - Assume that all non-Windows platform have a proper symlink
> implementation for perl.
> - If on Windows, check for the presence of Win32::Symlink:
> -- If the module is not detected, skip the tests not supported.
> -- If the module is detected, run them.

We should be more accurate about things like this:

+# The following tests test symlinks. Windows may not have symlinks, so
+# skip there.

The issue isn't whether Windows has symlinks, since all versions of 
Windows supported by PostgreSQL do (AFAIK).  The issue is only whether 
the Perl installation that runs the tests has symlink support.  And that 
is only necessary if the test itself wants to create or inspect 
symlinks.  For example, there are existing tests involving tablespaces 
that work just fine on Windows.

Relatedly, your patch ends up skipping the tests on MSYS2, even though 
Perl supports symlinks there out of the box.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Enable almost all TAP tests involving symlinks on Windows