#1071661 libapache2-mod-perl2: Apache::TestRun fails if some subdirectory lacks permissions

Package:
libapache2-mod-perl2
Source:
libapache2-mod-perl2
Description:
Integration of perl with the Apache2 web server
Submitter:
Ricardo Mones
Date:
2024-05-23 10:06:03 UTC
Severity:
normal
Tags:
#1071661#5
Date:
2024-05-23 09:58:07 UTC
From:
To:
Hi Damyan et al,

After changes in permissions of an unrelated subdirectory (but
nonetheless under the t/ directory), just found that my tests end with:

| Can't cd to (/home/mones/.../data/) somedir: Permission denied
|  at /usr/lib/x86_64-linux-gnu/perl5/5.36/Apache/TestRun.pm line 932.

Looking at the line 932 of TestRun.pm it can be found the problem is in
the warn_core sub, which invokes finddepth without setting the no_chdir
option.

To me looks excessive to fail because some subdir lacks permission while
finding cores for emitting a warning, since those dirs are not going to
hold a core file, and if they do it's probably unrelated to the testing
process.

So my proposed solution is to enable no_chdir on that finddepth call,
rewrite the wanted inline sub to be aware of it and also ignore items
without permissions. Does it sound OK?

I can try to write a Debian patch if the solution is acceptable.

best regards,