mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
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.
This commit is contained in:
parent
460314db08
commit
19c0422ad0
@ -80,6 +80,7 @@ my @scenario = (
|
|||||||
{
|
{
|
||||||
'name' => 'open_directory_fails',
|
'name' => 'open_directory_fails',
|
||||||
'mutilate' => \&mutilate_open_directory_fails,
|
'mutilate' => \&mutilate_open_directory_fails,
|
||||||
|
'cleanup' => \&cleanup_open_directory_fails,
|
||||||
'fails_like' => qr/could not open directory/,
|
'fails_like' => qr/could not open directory/,
|
||||||
'skip_on_windows' => 1
|
'skip_on_windows' => 1
|
||||||
},
|
},
|
||||||
@ -245,6 +246,15 @@ sub mutilate_open_directory_fails
|
|||||||
return;
|
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.)
|
# Create a directory that can't be searched. (This is skipped on Windows.)
|
||||||
sub mutilate_search_directory_fails
|
sub mutilate_search_directory_fails
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user