Skip some permissions checks on Cygwin
authorAndrew Dunstan <[email protected]>
Thu, 13 Jun 2024 11:38:48 +0000 (07:38 -0400)
committerAndrew Dunstan <[email protected]>
Thu, 13 Jun 2024 12:10:16 +0000 (08:10 -0400)
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
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_rewind/t/002_databases.pl

index 8387b945d369b3261fa5a324feb34473fa1d323e..9fbecd6bcd4bd607c1c79b728b27d8049a78759c 100644 (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";
index d0ba2ebf9b7e823eb55205fd1c32f71b4e7ab1bc..aea8be1f84018aa21afd7fc668557242fdffef7c 100644 (file)
@@ -218,7 +218,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;
@@ -304,9 +305,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) =
index a67a7eed4fcc92ca25a4a78f17e7e9219917e8a4..263e8288a54aa0477bf0509ddc0701724c26147d 100644 (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";
 
index f1eb4fe1d2b60cffc9fa0f700fd0d43b59f7f2a8..0a794b3a1b79ee6d0aeba394bc514888f7fcd0ff 100644 (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');