Installing (testing) in Linux as root enters infinite loop
hadjiprocopis opened this issue · comments
cpanm WWW::Mechanize::Chrome
gets stack on
Building and testing WWW-Mechanize-Chrome-0.72 ...
This is a bit more verbose and shows it gets stacked on t/49-pipe.t
:
cpanm --look WWW::Mechanize::Chrome
perl Makefile.PL && make all && make test
Finally, running:
perl Makefile.PL && make all && perl -Iblib/lib t/49-pipe.t
Shows the culprit to be:
# Testing with /usr/bin/google-chrome
[1220/101643.905504:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Thank you for this great software
Yeah - I'm still working on this one resp. thinking about whether to skip this test when running the tests as root. I see the options of
- skipping all tests when running as
root
/ with uid == 0 - removing
--no-sandbox
when running asroot
for the tests - always removing
--no-sandbox
when running asroot
Currently I think the second option is the best and least invasive option
Don't you need to add --no-sandbox
when running it as root?
I think just a simple warning can suffice when you detect that spawning that process resulted in the specific error.
If this is only a *nix issue then once you detect the problem you can suggest that running the tests as non-root, e.g. sudo -u XYZ make test
.
If it was simple for root to find a username XYZ (and safe) and run the make test
as XYZ and make install
as root, then I think postamble in Makefile.PL
can be useful. I can look at it. But what happens with the XYZ I do not know.