Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 19c0422

Browse files
committed
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.
1 parent 460314d commit 19c0422

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/bin/pg_validatebackup/t/003_corruption.pl

+10
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
{
8181
'name' => 'open_directory_fails',
8282
'mutilate' => \&mutilate_open_directory_fails,
83+
'cleanup' => \&cleanup_open_directory_fails,
8384
'fails_like' => qr/could not open directory/,
8485
'skip_on_windows' => 1
8586
},
@@ -245,6 +246,15 @@ sub mutilate_open_directory_fails
245246
return;
246247
}
247248

249+
# restore permissions on the unreadable directory we created.
250+
sub cleanup_open_directory_fails
251+
{
252+
my ($backup_path) = @_;
253+
my $pathname = "$backup_path/pg_subtrans";
254+
chmod(0700, $pathname) || die "chmod $pathname: $!";
255+
return;
256+
}
257+
248258
# Create a directory that can't be searched. (This is skipped on Windows.)
249259
sub mutilate_search_directory_fails
250260
{

0 commit comments

Comments
 (0)