Module-Pluggable icon indicating copy to clipboard operation
Module-Pluggable copied to clipboard

6.1 & 6.2: t/29unreadable.t tests fail when run as root

Open veryrusty opened this issue 1 year ago • 2 comments

It's not uncommon to have perl modules installed by root in docker images, especially for one-off, quick tasks. Doing so causes the unreadable files tests to fail in releases 6.1 and 6.2.

eg docker run --rm -ti perl:5.38 bash -c 'cpanm Module::Pluggable; cat /root/.cpanm/work/*/build.log'

and the root user can read the write-only files:

#   Failed test at t/29unreadable.t line 31.
#     Structures begin differing at:
#          $got->[0] = 'Unreadable::Foo'
#     $expected->[0] = Does not exist

#   Failed test at t/29unreadable.t line 36.
#     Structures begin differing at:
#          $got->[0] = 'Unreadable::Foo'
#     $expected->[0] = Does not exist
# Looks like you failed 2 tests of 6.
t/29unreadable.t .............

veryrusty avatar Oct 25 '24 06:10 veryrusty

@simonwistow anything we can do to help resolve this ? eg making a PR from @michal-josef-spacek patch from 156367

veryrusty avatar Oct 30 '24 22:10 veryrusty

For cross reference https://rt.cpan.org/Public/Bug/Display.html?id=156367

firefart avatar Nov 02 '24 20:11 firefart

@simonwistow It would be very kind to have PR #28 merged and a new version published on cpan. Thank you in advance.

level420 avatar Nov 05 '24 08:11 level420

@simonwistow any update on this?

firefart avatar Nov 12 '24 05:11 firefart

@simonwistow pls :')

maaarghk avatar Nov 14 '24 18:11 maaarghk

I would also like to express my hope that this PR can be merged. I'm adding:

RUN cpanm Module::Pluggable::Object --force

... as a workaround in my Dockerfile in the meantime, but it feels dirty to force a test

matthewf-ucsd avatar Nov 18 '24 23:11 matthewf-ucsd

would be nice to see this fixed.

davewood avatar Jan 09 '25 11:01 davewood