From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: TAP tests and symlinks on Windows
Date: Mon, 8 Jun 2020 14:44:31 +0200
Message-ID: <c50a646c-d9bb-7c62-a4bf-8256ff6ff338@2ndquadrant.com> (raw)
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
From 822583a01dc4f16d73390e266735d758e1507636 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Sat, 6 Jun 2020 09:38:54 +0200
Subject: [PATCH 1/2] Enable some symlink tests on Windows
---
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 6 +++---
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 11 +----------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.plindex 208df557b8..a10d201378 100644--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl@@ -211,11 +211,11 @@
'pg_basebackup tar with long name fails');
unlink "$pgdata/$superlongname";
-# The following tests test symlinks. Windows doesn't have symlinks, so-# skip on Windows.+# The following tests need some work to work correctly on Windows, so+# skip for now.
SKIP:
{
- skip "symlinks not supported on Windows", 18 if ($windows_os);+ skip "symlink tests not supported on Windows", 18 if ($windows_os);
# Move pg_replslot out of $pgdata and create a symlink to it.
$node->stop;
diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.plindex 639eeb9c91..e271a4ab16 100644--- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl+++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl@@ -6,16 +6,7 @@
use File::Copy;
use File::Path qw(rmtree);
use TestLib;
-use Test::More;-if ($windows_os)-{- plan skip_all => 'symlinks not supported on Windows';- exit;-}-else-{- plan tests => 5;-}+use Test::More tests => 5;
use FindBin;
use lib $FindBin::RealBin;
--
2.27.0
Attachments:
[text/plain] 0001-Enable-some-symlink-tests-on-Windows.patch (1.6K, ../c50a646c-d9bb-7c62-a4bf-8256ff6ff338@2ndquadrant.com/2-0001-Enable-some-symlink-tests-on-Windows.patch)
download | inline diff:
From 822583a01dc4f16d73390e266735d758e1507636 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Sat, 6 Jun 2020 09:38:54 +0200
Subject: [PATCH 1/2] Enable some symlink tests on Windows
---
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 6 +++---
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 11 +----------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.plindex 208df557b8..a10d201378 100644--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl@@ -211,11 +211,11 @@
'pg_basebackup tar with long name fails');
unlink "$pgdata/$superlongname";
-# The following tests test symlinks. Windows doesn't have symlinks, so-# skip on Windows.+# The following tests need some work to work correctly on Windows, so+# skip for now.
SKIP:
{
- skip "symlinks not supported on Windows", 18 if ($windows_os);+ skip "symlink tests not supported on Windows", 18 if ($windows_os);
# Move pg_replslot out of $pgdata and create a symlink to it.
$node->stop;
diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.plindex 639eeb9c91..e271a4ab16 100644--- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl+++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl@@ -6,16 +6,7 @@
use File::Copy;
use File::Path qw(rmtree);
use TestLib;
-use Test::More;-if ($windows_os)-{- plan skip_all => 'symlinks not supported on Windows';- exit;-}-else-{- plan tests => 5;-}+use Test::More tests => 5;
use FindBin;
use lib $FindBin::RealBin;
--
2.27.0
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com
Subject: Re: TAP tests and symlinks on Windows
In-Reply-To: <c50a646c-d9bb-7c62-a4bf-8256ff6ff338@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox