summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2024-06-13 11:38:48 +0000
committerAndrew Dunstan2024-06-13 11:38:48 +0000
commitf83908798f78c4cafda217ca875602c88ea2ae28 (patch)
tree403bc46acaae3c6419a42ebde66cc76fe6973d96
parent11b9b8ce44a8cc80cbef6ade2b5ae7438227da79 (diff)
Skip some permissions checks on Cygwin
These are checks that are already skipped on other Windows systems. Backpatch to all live branches, as appropriate.
-rw-r--r--src/bin/initdb/t/001_initdb.pl2
-rw-r--r--src/bin/pg_basebackup/t/010_pg_basebackup.pl2
-rw-r--r--src/bin/pg_ctl/t/001_start_stop.pl3
-rw-r--r--src/bin/pg_rewind/t/002_databases.pl2
-rw-r--r--src/bin/pg_verifybackup/t/003_corruption.pl3
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 b31dad2464f..06a35ac0b73 100644
--- a/src/bin/initdb/t/001_initdb.pl
+++ b/src/bin/initdb/t/001_initdb.pl
@@ -98,7 +98,7 @@ else
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 2d4b75a6fe5..489dde4adf1 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -483,7 +483,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 cbdaee57fb1..6a5ef007433 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 bbcd2047125..755ea80e332 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 f0b0f1f7e5b..fac823e9ce1 100644
--- a/src/bin/pg_verifybackup/t/003_corruption.pl
+++ b/src/bin/pg_verifybackup/t/003_corruption.pl
@@ -108,7 +108,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;