Bug 1797943

Summary: t/02_module_pod_output.t may fail if run as root
Product: [Fedora] Fedora Reporter: 1014938109
Component: perl-Pod-PerldocAssignee: Petr Pisar <ppisar>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 31CC: perl-devel, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-04 12:01:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description 1014938109 2020-02-04 09:33:23 UTC
Description of problem:
t/02_module_pod_output.t may fail if run as root

Version-Release number of selected component (if applicable):
perl-Pod-Perldoc-3.28.01-443.fc32

How reproducible:
run make test as root

Steps to Reproduce:
1.run rpmbuild perl-Pod-Perldoc as root user
2.
3.

Actual results:
+ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.t
t/00_load.t ............... ok
t/01_about_verbose.t ...... ok
t/02_module_pod_output.t .. 1/7
#   Failed test 'got expected output in STDOUT'
#   at t/02_module_pod_output.t line 47.
#                   undef
#     doesn't match '(?^:Look up Perl documentation)'

#   Failed test 'got expected output in STDERR'
#   at t/02_module_pod_output.t line 80.
#                   'Can't find any loadable formatter class in Pod::Perldoc::Totext Pod::Perldoc::Totext Pod::Perldoc::ToText Pod::Perldoc::ToTEXT Pod::Simple::text Pod::Simple::text Pod::Simple::Text Pod::Simple::TEXT Pod::text Pod::text Pod::Text Pod::TEXT Pod::Perldoc::ToPod?!
# Aborting
#  at /root/rpmbuild/BUILD/Pod-Perldoc-3.28/blib/script/perldoc line 6.
# '
#     doesn't match '(?^:No documentation)'
# Looks like you failed 2 tests of 7.


Expected results:
success

Additional info:

Comment 1 Petr Pisar 2020-02-04 12:01:58 UTC
It works for me in Fedora 32:

root@fedora-32:~/rpmbuild/SPECS # id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
root@fedora-32:~/rpmbuild/SPECS # rpmbuild -ba perl-Pod-Perldoc.spec
setting SOURCE_DATE_EPOCH=1580342400
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Q5yFjw
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf Pod-Perldoc-3.28
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/Pod-Perldoc-3.28.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd Pod-Perldoc-3.28
[...]
Wrote: /root/rpmbuild/RPMS/noarch/perl-Pod-Perldoc-3.28.01-443.fc32.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.te7blw
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd Pod-Perldoc-3.28
+ /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/perl-Pod-Perldoc-3.28.01-443.fc32.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0
root@fedora-32:~/rpmbuild/SPECS # echo $?
0

I suspect you hit <https://rt.cpan.org/Public/Bug/Display.html?id=127153> this issue when using containers. Unless you show it affects Fedora, please follow there.