Skip to content

print some context info for privileges in test suite#1390

Merged
giordano merged 1 commit into
JuliaPackaging:masterfrom
t-bltg:print-privileges-infos
Jul 6, 2025
Merged

print some context info for privileges in test suite#1390
giordano merged 1 commit into
JuliaPackaging:masterfrom
t-bltg:print-privileges-infos

Conversation

@t-bltg

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

Copy link
Copy Markdown
Contributor

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

giordano commented Jul 6, 2025

Copy link
Copy Markdown
Member

That's already run at

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

@t-bltg

t-bltg commented Jul 6, 2025

Copy link
Copy Markdown
Contributor Author

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