Skip to content

Commit 5762530

Browse files
committed
Skip some permissions checks on Cygwin
These are checks that are already skipped on other Windows systems. Backpatch to all live branches, as appropriate.
1 parent 5e8aa32 commit 5762530

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

src/bin/initdb/t/001_initdb.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
SKIP:
7878
{
7979
skip "unix-style permissions not supported on Windows", 2
80-
if ($windows_os);
80+
if ($windows_os || $Config::Config{osname} eq 'cygwin');
8181

8282
# Init a new db with group access
8383
my $datadir_group = "$tempdir/data_group";

src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@
221221
# skip on Windows.
222222
SKIP:
223223
{
224-
skip "symlinks not supported on Windows", 18 if ($windows_os);
224+
skip "symlinks not supported on Windows", 18
225+
if ($windows_os);
225226

226227
# Move pg_replslot out of $pgdata and create a symlink to it.
227228
$node->stop;
@@ -307,9 +308,15 @@
307308
"tablespace symlink was updated");
308309
closedir $dh;
309310

310-
# Group access should be enabled on all backup files
311-
ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
312-
"check backup dir permissions");
311+
SKIP:
312+
{
313+
skip "unix-style permissions not supported on Windows", 1
314+
if ($Config::Config{osname} eq 'cygwin');
315+
316+
# Group access should be enabled on all backup files
317+
ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
318+
"check backup dir permissions");
319+
}
313320

314321
# Unlogged relation forks other than init should not be copied
315322
my ($tblspc1UnloggedBackupPath) =

src/bin/pg_ctl/t/001_start_stop.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878

7979
SKIP:
8080
{
81-
skip "group access not supported on Windows", 3 if ($windows_os);
81+
skip "group access not supported on Windows", 3
82+
if ($windows_os || $Config::Config{osname} eq 'cygwin');
8283

8384
system_or_bail 'pg_ctl', 'stop', '-D', "$tempdir/data";
8485

src/bin/pg_rewind/t/002_databases.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ sub run_test
5757
SKIP:
5858
{
5959
skip "unix-style permissions not supported on Windows", 1
60-
if ($windows_os);
60+
if ($windows_os || $Config::Config{osname} eq 'cygwin');
6161

6262
ok(check_mode_recursive($node_master->data_dir(), 0750, 0640),
6363
'check PGDATA permissions');

src/bin/pg_verifybackup/t/003_corruption.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
SKIP:
101101
{
102102
skip "unix-style permissions not supported on Windows", 4
103-
if $scenario->{'skip_on_windows'} && $windows_os;
103+
if ($scenario->{'skip_on_windows'} &&
104+
($windows_os || $Config::Config{osname} eq 'cygwin'));
104105

105106
# Take a backup and check that it verifies OK.
106107
my $backup_path = $master->backup_dir . '/' . $name;

0 commit comments

Comments
 (0)