Skip to content

print some context info for privileges in test suite #1390

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

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

t-bltg
Copy link
Contributor

@t-bltg t-bltg commented Jul 5, 2025

I've had a look at #1377, and I couldn't easily find where the sudo prompt cmd was ran (it took me some time to find that it was defined in BinaryBuilderBase) and also the first tests using it in basic.jl are hiding valuable stdout/err output, so I thought it would be a good idea to print some information about preferred sunner and privileges as soon as possible in the test suite.

This is what the test suite output looks like after this PR:

     Testing Running tests...
[ Info: Julia versioninfo():
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 12th Gen Intel(R) Core(TM) i7-12700H
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, goldmont)
[ Info: BinaryBuilderBase.jl version: 1.37.0-tree-3aeceb80d8
[ Info: Kernel version: 6.11.0-29-generic
[ Info: pkg dir is NOT encrypted on mountpoint /
[ Info: storage dir is NOT encrypted on mountpoint /
[ Info: Relevant environment variables:
[ Info: Preferred runner: UserNSRunner
[ Info: Trying to run `echo hello julia` within a Linux x86_64 environment...
[ Info: Checking to see if [...]/BinaryBuilder.jl/test/ is encrypted...
[ Info: Checking to see if [...]/.julia/packages/BinaryBuilderBase/DhTtP/deps/ is encrypted...
┌ Warning: Unable to run unprivileged containers on this system! This may be because your kernel does not support mounting overlay filesystems within user namespaces. To work around this, we will switch to using privileged containers. This requires the use of sudo. To choose this automatically, set the BINARYBUILDER_RUNNER environment variable to "privileged" before starting Julia.
└ @ BinaryBuilderBase [...]/.julia/packages/BinaryBuilderBase/DhTtP/src/UserNSRunner.jl:97
[ Info: Running privileged container via `sudo`, may ask for your password:
[sudo] password for [...]:

, so it's now easy to have a look at BinaryBuilderBase/src/UserNSRunner.jl:97.

cc @giordano @eschnett

@t-bltg t-bltg changed the title print some context info print some context info for privileges in the test suite Jul 5, 2025
@t-bltg t-bltg force-pushed the print-privileges-infos branch from 86f57c4 to b12bb6e Compare July 5, 2025 16:10
@t-bltg t-bltg changed the title print some context info for privileges in the test suite print some context info for privileges in test suite Jul 5, 2025
@giordano
Copy link
Member

giordano commented Jul 6, 2025

That's already run at

$(JULIA) -e 'using BinaryBuilder; BinaryBuilder.versioninfo()'
Do you want to see it when running the tests locally?

@t-bltg
Copy link
Contributor Author

t-bltg commented Jul 6, 2025

Do you want to see it when running the tests locally?

Yes, exactly, I think this would be a bit more user friendly.

@giordano giordano merged commit 9aa7183 into JuliaPackaging:master Jul 6, 2025
9 checks passed
@t-bltg t-bltg deleted the print-privileges-infos branch July 6, 2025 11:06
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

Successfully merging this pull request may close these issues.

2 participants