Skip some permissions checks on Cygwin

These are checks that are already skipped on other Windows systems.

Backpatch to all live branches, as appropriate.
This commit is contained in:
Andrew Dunstan 2024-06-13 07:38:48 -04:00
parent 5e8aa32a9c
commit 57625308f6
5 changed files with 17 additions and 8 deletions

View File

@ -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";

View File

@ -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;
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) =

View File

@ -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";

View File

@ -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');

View File

@ -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;