Skip to content

tests: fix race in GdbController gcore tests - #17

Open
raiden00pl wants to merge 1 commit into
apache:mainfrom
raiden00pl:kernel-mode-support-pr3
Open

tests: fix race in GdbController gcore tests#17
raiden00pl wants to merge 1 commit into
apache:mainfrom
raiden00pl:kernel-mode-support-pr3

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

The gcore tests wrote the "Saved corefile" and GCORE_MARKER reply lines into the pipe before calling generate_coredump(). If the reader thread consumed those lines before generate_coredump() reset _gcore_done and _last_corefile, the reset discarded them and the wait timed out, returning None (seen as a flaky CI failure on the Python 3.14 job).

Feed the reply via a proc.stdin.write side effect triggered by the GCORE_MARKER echo command instead, so it arrives only after the controller has issued the gcore command -- mirroring real gdb and making the ordering deterministic.

The gcore tests wrote the "Saved corefile" and GCORE_MARKER reply
lines into the pipe before calling generate_coredump().  If the
reader thread consumed those lines before generate_coredump()
reset _gcore_done and _last_corefile, the reset discarded them and
the wait timed out, returning None (seen as a flaky CI failure on
the Python 3.14 job).

Feed the reply via a proc.stdin.write side effect triggered by the
GCORE_MARKER echo command instead, so it arrives only after the
controller has issued the gcore command -- mirroring real gdb and
making the ordering deterministic.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant