postgres.git / summary / log / commit / refs
commit c38518fa978075d08d64a34e1b4504da13a81e02
Author: Andrew Dunstan <andrew@dunslane.net>
Date: Thu Jun 13 11:38:48 2024 +0000
First released in: 17.0, 12.20, 13.16, 14.13, 15.8, 16.4
Skip some permissions checks on Cygwin
These are checks that are already skipped on other Windows systems.
Backpatch to all live branches, as appropriate.
src/bin/initdb/t/001_initdb.pl | 2 +-
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 +-
src/bin/pg_ctl/t/001_start_stop.pl | 3 ++-
src/bin/pg_rewind/t/002_databases.pl | 2 +-
src/bin/pg_verifybackup/t/003_corruption.pl | 3 ++-
5 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/bin/initdb/t/001_initdb.pl b/src/bin/initdb/t/001_initdb.pl
index 164fc11cbff..96950c04ea1 100644
--- a/src/bin/initdb/t/001_initdb.pl
+++ b/src/bin/initdb/t/001_initdb.pl
@@ -80,7 +80,7 @@ command_fails([ 'initdb', $datadir ], 'existing data directory');
SKIP:
{
skip "unix-style permissions not supported on Windows", 2
- if ($windows_os);
+ if ($windows_os || $Config::Config{osname} eq 'cygwin');
# Init a new db with group access
my $datadir_group = "$tempdir/data_group";
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index e0f34e16f92..f18d331d060 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -489,7 +489,7 @@ SKIP:
SKIP:
{
skip "unix-style permissions not supported on Windows", 1
- if ($windows_os);
+ if ($windows_os || $Config::Config{osname} eq 'cygwin');
ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
"check backup dir permissions");
diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl
index fdffd76d991..813c31b9a37 100644
--- a/src/bin/pg_ctl/t/001_start_stop.pl
+++ b/src/bin/pg_ctl/t/001_start_stop.pl
@@ -79,7 +79,8 @@ $logFileName = "$tempdir/data/perm-test-640.log";
SKIP:
{
- skip "group access not supported on Windows", 3 if ($windows_os);
+ skip "group access not supported on Windows", 3
+ if ($windows_os || $Config::Config{osname} eq 'cygwin');
system_or_bail 'pg_ctl', 'stop', '-D', "$tempdir/data";
diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl
index 8d6c0c0b280..13032bad44d 100644
--- a/src/bin/pg_rewind/t/002_databases.pl
+++ b/src/bin/pg_rewind/t/002_databases.pl
@@ -60,7 +60,7 @@ template1
SKIP:
{
skip "unix-style permissions not supported on Windows", 1
- if ($windows_os);
+ if ($windows_os || $Config::Config{osname} eq 'cygwin');
ok(check_mode_recursive($node_primary->data_dir(), 0750, 0640),
'check PGDATA permissions');
diff --git a/src/bin/pg_verifybackup/t/003_corruption.pl b/src/bin/pg_verifybackup/t/003_corruption.pl
index 3dba7d8a698..d183516b160 100644
--- a/src/bin/pg_verifybackup/t/003_corruption.pl
+++ b/src/bin/pg_verifybackup/t/003_corruption.pl
@@ -101,7 +101,8 @@ for my $scenario (@scenario)
SKIP:
{
skip "unix-style permissions not supported on Windows", 4
- if $scenario->{'skip_on_windows'} && $windows_os;
+ if ($scenario->{'skip_on_windows'} &&
+ ($windows_os || $Config::Config{osname} eq 'cygwin'));
# Take a backup and check that it verifies OK.
my $backup_path = $primary->backup_dir . '/' . $name;
[parent: 1d0399b54068]