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:38:48 +0000 (07:38 -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 b31dad2464f413356cd2724be1591783118714a0..06a35ac0b738e9dda06543f0ed7de0a0d356fc79 100644 (file)
@@ -98,7 +98,7 @@ else
 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 2d4b75a6fe54bbd893b4afe0bdae4cd81bda31e6..489dde4adf155cdcc85ce3af83a8550e76f8ce0d 100644 (file)
@@ -483,7 +483,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 cbdaee57fb143cbfbdf97ad9f78f3e3eefeb87ae..6a5ef0074335da3b67ac2622e497e20c99bd68f1 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 bbcd20471254679130f4e57fbb365c2b662f6f1d..755ea80e332f95a3992e8f21c3410a7ca0c1b706 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 f0b0f1f7e5bc8fef95ef5bc7f330e8a8edfd7f75..fac823e9ce100c18b073e0a58fdcb552be9fcf9e 100644 (file)
@@ -108,7 +108,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;