summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorAndrew Dunstan2024-06-13 11:38:48 +0000
committerAndrew Dunstan2024-06-13 12:07:20 +0000
commit57625308f62da2d4f875478a39158a23e41a3dbe (patch)
tree756385aa297466ef064dc7593ea9cf6ddd28285c /src/bin
parent5e8aa32a9ce78abcfea3ed157d7b66fb3bff5f58 (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.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/initdb/t/001_initdb.pl2
-rw-r--r--src/bin/pg_basebackup/t/010_pg_basebackup.pl15
-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, 17 insertions, 8 deletions
diff --git a/src/bin/initdb/t/001_initdb.pl b/src/bin/initdb/t/001_initdb.pl
index 8387b945d36..9fbecd6bcd4 100644
--- a/src/bin/initdb/t/001_initdb.pl
+++ b/src/bin/initdb/t/001_initdb.pl
@@ -77,7 +77,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 09c540060a4..93991b60078 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -221,7 +221,8 @@ SKIP:
# skip on Windows.
SKIP:
{
- skip "symlinks not supported on Windows", 18 if ($windows_os);
+ skip "symlinks not supported on Windows", 18
+ if ($windows_os);
# Move pg_replslot out of $pgdata and create a symlink to it.
$node->stop;
@@ -307,9 +308,15 @@ SKIP:
"tablespace symlink was updated");
closedir $dh;
- # Group access should be enabled on all backup files
- ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
- "check backup dir permissions");
+ SKIP:
+ {
+ skip "unix-style permissions not supported on Windows", 1
+ if ($Config::Config{osname} eq 'cygwin');
+
+ # Group access should be enabled on all backup files
+ ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
+ "check backup dir permissions");
+ }
# Unlogged relation forks other than init should not be copied
my ($tblspc1UnloggedBackupPath) =
diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl
index 9ca93144816..0b2f7df1b23 100644
--- a/src/bin/pg_ctl/t/001_start_stop.pl
+++ b/src/bin/pg_ctl/t/001_start_stop.pl
@@ -78,7 +78,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 1db534c0dc0..65281af1e4f 100644
--- a/src/bin/pg_rewind/t/002_databases.pl
+++ b/src/bin/pg_rewind/t/002_databases.pl
@@ -57,7 +57,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_master->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 40b2e3f5bb9..c491f7f930d 100644
--- a/src/bin/pg_verifybackup/t/003_corruption.pl
+++ b/src/bin/pg_verifybackup/t/003_corruption.pl
@@ -100,7 +100,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 = $master->backup_dir . '/' . $name;