Skip to content

tests: skip test_fod_with_uncached_input_issue413 on macOS - #420

Open
edolstra wants to merge 1 commit into
NixOS:mainfrom
DeterminateSystems:fix-darwin-test
Open

tests: skip test_fod_with_uncached_input_issue413 on macOS#420
edolstra wants to merge 1 commit into
NixOS:mainfrom
DeterminateSystems:fix-darwin-test

Conversation

@edolstra

Copy link
Copy Markdown
Member

This fixes a nix flake check failure on macOS, as seen here: https://github.com/DeterminateSystems/nix-eval-jobs/actions/runs/27219083796/job/80530442558

nix-eval-jobs-functional-tests> error:
nix-eval-jobs-functional-tests>        … while waiting for the build environment for '/nix/var/nix/builds/nix-2183-3905262493/pytest-of-_nixbld1/pytest-0/test_fod_with_uncached_input_i1/store/2ax8r4h4wfwshdihxz260aayk1wx3sy6-never-cached.drv' to initialize (failed with exit code 1, previous messages: sandbox initialization failed: Operation not permitted|failed to configure sandbox: Operation not permitted)
nix-eval-jobs-functional-tests> 
nix-eval-jobs-functional-tests>        error: unexpected EOF reading a line

Running sandbox-exec inside a sandboxed build does not currently work, so just skip that test.

I guess the underlying problem is that Nix always uses sandbox-exec even when sandboxing is disabled. We should probably add a way to really disable sandboxing.

This test performs a real nested `nix build`. On macOS, Nix configures a
sandbox-exec profile even with sandbox=false, which cannot be nested
inside the functional-tests build sandbox, failing with "sandbox
initialization failed: Operation not permitted". Skip it on Darwin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@pytest.mark.skipif(shutil.which("nix") is None, reason="requires nix CLI")
@pytest.mark.skipif(
sys.platform == "darwin",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: test if we can check if we run inside macOS with sandbox enabled or not.

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