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:42:14 +0000 (07:42 -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 635ff79b475d0dbb6f1f044d9c0c5b625b899dfb..2565957efdc145b29c790c36bed700ecddb7d737 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 e23ac607aae0c9f99bb26c83f1f94231fbac3602..476db8ad68f471cb382e19630a4af4705e64cd1c 100644 (file)
@@ -369,7 +369,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 d656a7fe1832242021788ed92e55eec3845764b2..cdd043fa2f23654048dc09af49774359e5770033 100644 (file)
@@ -81,7 +81,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 72c4b225a7f1df1eda104a9a05854b02c016ced6..28a001ec622363e5c131c56305cd645f0a6beeab 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 867c1029105ac6158cc7e47b20b7da54da28e7cf..709c2afe5bb0a1c12c2d8c04e0151cfd1000f1c6 100644 (file)
@@ -103,7 +103,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;