git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 460314d)
pg_validatebackup: Adjust TAP tests to undo permissions change.
Fri, 3 Apr 2020 23:01:59 +0000 (19:01 -0400)
Fri, 3 Apr 2020 23:01:59 +0000 (19:01 -0400)
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.


diff --git a/src/bin/pg_validatebackup/t/003_corruption.pl b/src/bin/pg_validatebackup/t/003_corruption.pl
index 416bc9194f053bd03bd5183ad2155821a631b87b..7a09d02e6c70eb303d0635e5c727ff92b4ecd6f9 100644 (file)
--- 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
{
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /