Repository navigation
e2e: fix the TestKillMatching flake, wait for the child's command line - #3155
Merged
Tim Hockin (thockin) merged 1 commit intoOct 23, 2026
Merged
Conversation
Collaborator
Author
Davanum Srinivas (dims)
force-pushed
the
e2e-kill-test-cmdline
branch
from
October 23, 2026 14:14
f9c4958 to
b7eda13
Compare
Davanum Srinivas (dims)
marked this pull request as ready for review
October 23, 2026 14:15
TestKillMatching read /proc/<pid>/cmdline right after Start. Start returns when the exec closes the child's status pipe, and the kernel closes it before it sets up the new argument area, so the file can still read empty and killMatching finds nothing. Poll for the command line first.
Davanum Srinivas (dims)
force-pushed
the
e2e-kill-test-cmdline
branch
from
October 23, 2026 15:10
b7eda13 to
0b453ea
Compare
Tim Hockin (thockin)
approved these changes
Oct 23, 2026
Tim Hockin (thockin)
left a comment
Collaborator
There was a problem hiding this comment.
I did not believe this so I had to go test it. TIL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flake fix.
TestKillMatchingreads/proc/<pid>/cmdlineright afterStart.Startreturns when the exec closes the child's status pipe, and the kernel does that before it sets up the new argv, so the file can still read empty andkillMatchingfinds nothing:kill_test.go:41: killed 0, want 1(2026-10-19, 2026-10-23).Poll for the command line before calling
killMatching.Pinned to one CPU on Linux 6.8 (
taskset -c 0 go test -count=3000), the old test failed 4 of 3000 runs withkilled 0, the fixed one 0 of 3000.