aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2020-04-03 19:01:59 -0400
committerRobert Haas <rhaas@postgresql.org>2020-04-03 19:01:59 -0400
commit19c0422ad012636d00ba221bd7052cb71448efca (patch)
tree00448843829bf480113ad29306512b8e7505cb36 /src
parent460314db08e8688e1a54a0a26657941e058e45c5 (diff)
downloadpostgresql-19c0422ad012636d00ba221bd7052cb71448efca.tar.gz
postgresql-19c0422ad012636d00ba221bd7052cb71448efca.zip
pg_validatebackup: Adjust TAP tests to undo permissions change.
It may be necessary to go further and remove this test altogether, but I'm going to try this fix first. It's not clear, at least to me, exactly how this is breaking buildfarm members, but it appears to be doing so.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_validatebackup/t/003_corruption.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/pg_validatebackup/t/003_corruption.pl b/src/bin/pg_validatebackup/t/003_corruption.pl
index 416bc9194f0..7a09d02e6c7 100644
--- a/src/bin/pg_validatebackup/t/003_corruption.pl
+++ b/src/bin/pg_validatebackup/t/003_corruption.pl
@@ -80,6 +80,7 @@ my @scenario = (
{
'name' => 'open_directory_fails',
'mutilate' => \&mutilate_open_directory_fails,
+ 'cleanup' => \&cleanup_open_directory_fails,
'fails_like' => qr/could not open directory/,
'skip_on_windows' => 1
},
@@ -245,6 +246,15 @@ sub mutilate_open_directory_fails
return;
}
+# restore permissions on the unreadable directory we created.
+sub cleanup_open_directory_fails
+{
+ my ($backup_path) = @_;
+ my $pathname = "$backup_path/pg_subtrans";
+ chmod(0700, $pathname) || die "chmod $pathname: $!";
+ return;
+}
+
# Create a directory that can't be searched. (This is skipped on Windows.)
sub mutilate_search_directory_fails
{