I wrote:
> I'm guessing that we're looking at a platform-specific difference in
> whether "rm -rf" fails outright on an unreadable subdirectory, or
> just tries to carry on by unlinking it anyway.
Yeah... on my RHEL6 box, "make check" cleans up the working directories
under tmp_check, but on a FreeBSD 12.1 box, not so much: I'm left with
$ ls tmp_check/
log/ t_003_corruption_master_data/
tgl@oldmini$ ls -R tmp_check/t_003_corruption_master_data/
backup/
tmp_check/t_003_corruption_master_data/backup:
open_directory_fails/
tmp_check/t_003_corruption_master_data/backup/open_directory_fails:
pg_subtrans/
tmp_check/t_003_corruption_master_data/backup/open_directory_fails/pg_subtrans:
ls: tmp_check/t_003_corruption_master_data/backup/open_directory_fails/pg_subtrans: Permission denied
I did not see any complaints printed to the terminal, but in
regress_log_003_corruption there's
...
ok 40 - corrupt backup fails validation: open_directory_fails: matches
cannot chdir to child for
/usr/home/tgl/pgsql/src/bin/pg_validatebackup/tmp_check/t_003_corruption_master_data/backup/open_directory_fails/pg_subtrans:
Permissiondenied at t/003_corruption.pl line 126.
cannot remove directory for
/usr/home/tgl/pgsql/src/bin/pg_validatebackup/tmp_check/t_003_corruption_master_data/backup/open_directory_fails:
Directorynot empty at t/003_corruption.pl line 126.
# Running: pg_basebackup -D
/usr/home/tgl/pgsql/src/bin/pg_validatebackup/tmp_check/t_003_corruption_master_data/backup/search_directory_fails
--no-sync-T /tmp/lxaL_sLcnr=/tmp/_fegwVjoDR
ok 41 - base backup ok
...
This may be more of a Perl version issue than a platform issue,
but either way it's a problem.
Also, on the FreeBSD box, "rm -rf" isn't happy either:
$ rm -rf tmp_check
rm: tmp_check/t_003_corruption_master_data/backup/open_directory_fails/pg_subtrans: Permission denied
rm: tmp_check/t_003_corruption_master_data/backup/open_directory_fails: Directory not empty
rm: tmp_check/t_003_corruption_master_data/backup: Directory not empty
rm: tmp_check/t_003_corruption_master_data: Directory not empty
rm: tmp_check: Directory not empty
regards, tom lane