Files
tailscale/fuzz
Mike Jensen 642099cf89 fuzz: hide external test files from go-118-fuzz-build during fuzzer builds (#21082)
go-118-fuzz-build (fc5dc53b) overlays every sibling _test.go in the fuzzer's directory onto a non-test path (<base>_libFuzzer.go). Sibling test files declaring an external test package (package foo_test) then collide with the fuzzer's package, failing the build with "found packages foo and foo_test".

One possible fix would be to stop using external _test package for our tests, but this change attempts to address this issue without changing our test packaging structure.

This change wraps each compile_native_go_fuzzer_v2 call in build_fuzzer, which hides the files in `go list .XTestGoFiles` for the build. Internal test files stay visible since the fuzz target may use their helpers.

Updates https://github.com/tailscale/corp/issues/46608

Change-Id: Ic6805854f76c597a5edff60674b5ea05b2d18ea9

Signed-off-by: Mike Jensen <mikej@tailscale.com>
2026-09-02 11:21:32 -06:00
..