Repository navigation
test(bwrap): assert a host env var is absent inside the sandbox (#87) - #105
Open
HusseinAdeiza wants to merge 1 commit into
Open
HusseinAdeiza wants to merge 1 commit into
HusseinAdeiza wants to merge 1 commit into
Conversation
…ayerlabs#87) The argv-shape test only proves --clearenv is ordered before the first --setenv, which stays green if the flag stops taking effect. Run bwrap for real with the env flags extracted from build_bwrap_args/7, set a sentinel in the orchestrator env, and assert it is absent inside. A second test asserts the same argv without --clearenv does inherit it, so the first cannot pass for the wrong reason. Skips when bwrap is unavailable.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Open
3 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the test item on #87. The
--clearenvfix itself already landed in #92 before the issue was filed.BwrapBackendTestasserts--clearenvis ordered before the first--setenv. That stays green if the flag stops having any effect, which is the failure mode that matters here.This runs bwrap for real, using the env flags extracted from
build_bwrap_args/7rather than restated, so it can't drift from the allowlist it polices:A second test asserts the same argv without
--clearenvdoes inherit the sentinel, so the first can't pass for the wrong reason. Verified by deleting"--clearenv"from the argv: the first test fails withproduction argv lost --clearenv.Skips cleanly when bwrap is absent or user namespaces are unavailable.
mix formaton the new file;mix test test/genswarms/backends/is 224 tests, 1 failure, 12 skipped. The one failure isrootless_overlay_test.exsneeding/nix/store, and it fails identically on unmodifiedmain.