pgsql: Enable almost all TAP tests involving symlinks on Windows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Enable almost all TAP tests involving symlinks on Windows
Date: 2020-07-16 19:52:11
Message-ID: E1jw9vP-0005pQ-Pd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Enable almost all TAP tests involving symlinks on Windows

Windows has junction points which function as symbolic links for
directories. This patch introduces a new function TestLib::dir_symlink()
which creates a junction point on Windows and a standard Unix type
symbolic link elsewhere.

The function TestLib::perl2host is also modified, first to use cygpath
where it's available (e.g. msys2) and second to allow it to succeed if
the gandparent directory exists but the parent does not.

Given these changes the only symlink tests that need to be skipped on
Windows are those related to permissions or to use of readlink. The
relevant tests for pg_basebackup and pg_rewind are therefore adjusted
accordingly.

Andrew Dunstan, reviewed by Peter Eisentraut and Michael Paquier.

Discussion: https://postgr.es/m/c50a646c-d9bb-7c62-a4bf-8256ff6ff338@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d66b23b032d75614e1be47ca182020960d89206d

Modified Files
--------------
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 280 ++++++++++++++-------------
src/bin/pg_dump/t/010_dump_connstr.pl | 4 +-
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 13 +-
src/test/perl/TestLib.pm | 73 ++++++-
4 files changed, 218 insertions(+), 152 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2020-07-17 02:38:51 pgsql: Add huge_page_size setting for use on Linux.
Previous Message Michael Paquier 2020-07-16 06:54:46 pgsql: Switch pg_test_fsync to use binary mode on Windows