Skip to content

test(eval): avoid ETXTBSY in parallel fake-runtime tests - #4556

Merged
dgageot merged 1 commit into
mainfrom
fix/eval-runtime-etxtbsy
Oct 8, 2026
Merged

dgageot merged 1 commit into
mainfrom
fix/eval-runtime-etxtbsy

Conversation

@dgageot

@dgageot dgageot commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix the existing Linux flake exposed by #4554: TestRunDockerAgentInContainerUsesConfiguredRuntime failed to execute its freshly written fake-podman script with text file busy (CI log).

The affected tests write executable scripts after entering t.Parallel(). A concurrent fork can inherit a writable descriptor until its child reaches exec, causing Linux to reject execution with ETXTBSY even after os.WriteFile returns.

  • Create fake-runtime executables before the top-level parallel barrier, following the existing build_test.go pattern.
  • Use shared immutable scripts and per-case symlinks in table-driven tests; script output remains isolated in each subtest's directory.
  • Fix the same pattern across the other affected evaluation tests. No production code changes.

Related to #4554; this does not modify or close that dependency-upgrade PR.

Validation

  • task build
  • task test
  • task lint using official golangci-lint v2.13.2 built with Go 1.27.0
  • Entire pkg/evaluation test binary: 100 repetitions with -test.shuffle=on -test.parallel=32 on Linux/arm64 in Docker, built with Go 1.27.0

The baseline stress run did not reproduce the flake. Local Linux validation was arm64, not CI's amd64; CI validation is pending.

Write fake container runtime scripts before t.Parallel and symlink
them from each subtest's temp dir, so forked children don't inherit
a writable executable fd and hit ETXTBSY on Linux.

Assisted-By: cagent
@dgageot
dgageot requested a review from a team as a code owner October 8, 2026 16:11
@dgageot
dgageot enabled auto-merge October 8, 2026 16:24
@aheritier aheritier added area/testing Test infrastructure, CI/CD, test runners, evaluation kind/test Test-only changes labels Oct 8, 2026
@dgageot
dgageot added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 7d1edf0 Oct 8, 2026
16 checks passed
@dgageot
dgageot deleted the fix/eval-runtime-etxtbsy branch October 8, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Test infrastructure, CI/CD, test runners, evaluation kind/test Test-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants