Skip some permissions checks on Cygwin
authorAndrew Dunstan
Thu, 13 Jun 2024 11:38:48 +0000 (07:38 -0400)
committerAndrew Dunstan
Thu, 13 Jun 2024 11:41:49 +0000 (07:41 -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 164fc11cbffc8c466f84d51c07106b602d022bc6..96950c04ea1f97b5a522e84ed225766010159bf8 100644 (file)
@@ -80,7 +80,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 e0f34e16f92caec72f7abcd9f8dc7c3f4b31eb44..f18d331d0600f14ad39edcd2d093575832a136a7 100644 (file)
@@ -489,7 +489,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 fdffd76d9914f313cdba624b244c5d7bb0b91062..813c31b9a3755cf4a66cad755b9b71c4834d2c5d 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 8d6c0c0b280f032f61f558a519692101b23fd257..13032bad44da8cdc1c7f8236d65bae20b948ac08 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 3dba7d8a698927b83418da025ac28c0921792b70..d183516b160db9da72104569d90bd7871fda08a5 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;