Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing (testing) in Linux as root enters infinite loop #78

Open
hadjiprocopis opened this issue Dec 20, 2023 · 2 comments
Open

Installing (testing) in Linux as root enters infinite loop #78

hadjiprocopis opened this issue Dec 20, 2023 · 2 comments

Comments

@hadjiprocopis
Copy link

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

@Corion
Copy link
Owner

Corion commented Dec 20, 2023

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 as root for the tests
  • always removing --no-sandbox when running as root

Currently I think the second option is the best and least invasive option

@hadjiprocopis
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants