Skip to content

fix(test): test_all_artifacts panics when fuzz corpus dir absent (regression from #148) #150

@polaz

Description

@polaz

After PR #148 untracked zstd/fuzz/artifacts/** via git rm --cached, git pull deletes those files locally. test_all_artifacts unwraps fs::read_dir("./fuzz/artifacts/decode") and now panics on every fresh checkout / CI worker:

```
thread 'tests::fuzz_regressions::test_all_artifacts' panicked at zstd/src/tests/fuzz_regressions.rs:12:57:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
```

Test suite on main is currently red.

Fix: treat NotFound as a no-op. The corpus is locally produced or CI-generated and intentionally untracked. The other regression test in the file (interop_7_byte_input_does_not_oob_in_dfast_fast_loop) pins the canonical 7-byte crash as bytes inline, so the regression contract for known-bad inputs is still covered.

Already implemented in PR #149 — extracting into standalone hotfix so main goes green without waiting for the full #99 review cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions