TAP tests and symlinks on Windows

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

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-06-08T12:44:31Z
Lists: pgsql-hackers

Attachments

The tests

src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl

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.

If I remove the skip stuff in pg_basebackup/t/010_pg_basebackup.pl, it 
fails in various interesting ways.  Apparently, some more work is needed 
to get the various paths handled correct on Windows.  (At least a 
TestLib::perl2host call appears to be required.)  I don't have the 
enthusiasm to fix this right now, but my patch at least updates the 
comment from "this isn't supported" to "this doesn't work correctly yet".

-- 
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