Skip to content

Fixture creation in gix-status-tests fails with PermissionDenied for unreadable_untracked fixture #2548

@cruessler

Description

I’ve come across an issue related to fixture creation triggered by a test in gix-status-tests.

Steps to reproduce (update 2026-04-28)

In the gitoxide repo, on commit 4d5ba23.

rm -rf gix-status/tests/fixtures/generated-archives

cargo nextest run -p gix-status-tests --features gix-features-parallel --no-fail-fast

I’ve been running this because my go-to command for testing whether generating fixtures for a specific crate works is:

# this removes both `generated-fixtures` as well as `generated-do-not-edit`
# I run this to make sure `SHA-256` fixtures are generated for the PRs that add
# running tests with `SHA-256`
rm -rf gix-status/tests/fixtures/generated-*

Usually, this makes the tests just recreate both directories. In this very specific case, though, unreadable_untracked.tar, is in gix-status/tests/fixtures/generated-archives/.gitignore, and on my Linux machine, I get a test that fails with:

        FAIL [   0.020s] gix-status-tests::status index_as_worktree_with_renames::unreadable_untracked
  stdout ───

    running 1 test
    test index_as_worktree_with_renames::unreadable_untracked ... FAILED

    failures:

    failures:
        index_as_worktree_with_renames::unreadable_untracked

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 30 filtered out; finished in 0.02s

  stderr ───
    Archive at 'fixtures/generated-archives/unreadable_untracked.tar' not found, creating fixture using script 'unreadable_untracked.sh'

    thread 'index_as_worktree_with_renames::unreadable_untracked' (206767) panicked at gix-status/tests/status/mod.rs:21:6:
    script works: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }

All other tests gix-status-tests are passing, it’s just this specific test that’s failing.

From what I can tell, this is the line the error happens in:

ar.append_dir_all(".", source_dir)?;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions