Skip to content

refactor(test): migrate jailer.rs to BoxTestBase and fix deny-profile assertion#312

Merged
DorianZheng merged 1 commit intomainfrom
fix/jailer-test-boxtestbase-migration
Feb 27, 2026
Merged

refactor(test): migrate jailer.rs to BoxTestBase and fix deny-profile assertion#312
DorianZheng merged 1 commit intomainfrom
fix/jailer-test-boxtestbase-migration

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • Migrate all 7 jailer integration tests from ad-hoc JailerTestCtx to shared BoxTestBase infrastructure, matching the pattern from refactor(test): migrate health_check.rs to BoxTestBase #311
  • Fix jailer_enabled_custom_profile_deny_boxes_subpath_blocks_start assertion that failed after migration: sandbox denial manifests as EEXIST ("File exists") rather than EPERM ("operation not permitted") because create_dir_all can't stat() a pre-created directory when file-read* is denied

Test plan

  • All 104 boxlite tests pass (cargo test -p boxlite)
  • Clippy clean (cargo clippy -p boxlite --tests -- -D warnings)
  • Format clean (cargo fmt --check)

… assertion

Migrate all 7 jailer integration tests from the ad-hoc JailerTestCtx to the
shared BoxTestBase infrastructure, matching the pattern established in #311.

Fix the `jailer_enabled_custom_profile_deny_boxes_subpath_blocks_start` test
which failed after migration: the sandbox denial now manifests as "File exists"
(EEXIST from mkdir when stat() is blocked) rather than "operation not permitted".
Add "file exists" as valid deny evidence since create_dir_all only surfaces
EEXIST when the sandbox prevents the stat() verification of an existing directory.
@DorianZheng DorianZheng merged commit 2770756 into main Feb 27, 2026
18 checks passed
@DorianZheng DorianZheng deleted the fix/jailer-test-boxtestbase-migration branch February 27, 2026 08:44
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.

1 participant