Skip to content

automaton: raise on Windows WAIT_FAILED - #5238

Open
polybassa wants to merge 2 commits into
secdev:masterfrom
polybassa:fix-windows-wait-failed
Open

polybassa wants to merge 2 commits into
secdev:masterfrom
polybassa:fix-windows-wait-failed

Conversation

@polybassa

Copy link
Copy Markdown
Contributor

On Windows, ctypes can return WAIT_FAILED as -1, so select_objects() may treat it as an input index and report an unreadable object as ready. Raise the Windows error for failed waits and close temporary Winsock events before propagating it.

AI-Assisted: yes (GPT-6)

ctypes may return WAIT_FAILED as -1, which select_objects() treats as an input index and can report the last object ready. Raise the Windows error and close temporary Winsock events on failed waits.

AI-Assisted: yes (GPT-6)
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.55%. Comparing base (57dd077) to head (79d90d2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5238   +/-   ##
=======================================
  Coverage   80.55%   80.55%           
=======================================
  Files         375      375           
  Lines       98399    98409   +10     
=======================================
+ Hits        79261    79271   +10     
  Misses      19138    19138           
Files with missing lines Coverage Δ
scapy/automaton.py 81.65% <100.00%> (+0.17%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@polybassa

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

AI-Assisted: yes (OpenCode, GPT-6.1)
@gpotter2

Copy link
Copy Markdown
Member

I think you could implement this as a big try/finally that calls the for .. in created loop that's already at the bottom

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.

2 participants