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 11:40:58 +0000 (07:40 -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
src/bin/pg_verifybackup/t/003_corruption.pl

index 0e4f0b5e644f1a96ea30131985660a5f1c3a9aae..ca9c8b100661813a72e183822050a099a911258d 100644 (file)
@@ -86,7 +86,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 c8cef688d4982c7c5fa1523909869e8bee9eb138..938dced09095fb14229d8ae36f310347dd6b766e 100644 (file)
@@ -495,7 +495,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");
index f019fe1703f3ead97f026e755e0a032aae188152..152c29892ef81a9737c6d26597ba998092038068 100644 (file)
@@ -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";
 
index 0d480aedb48bad166a0ab1c1adce80183984a5e5..01eb9227093f69ef12f62f0016d788199aa8c0b0 100644 (file)
@@ -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');
index 4cc3dd05e3e2eec8cf392f0ae1ab743c56d3db69..6490036edf644a3bca5b10c55d70bfef336dae0c 100644 (file)
@@ -101,7 +101,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;