Skip to content

automotive, inet6, automaton: stabilize CI timeouts and fix Windows select_objects - #5234

Merged
polybassa merged 5 commits into
secdev:masterfrom
BenGardiner:fix-doip-test-timeout
Oct 22, 2026
Merged

polybassa merged 5 commits into
secdev:masterfrom
BenGardiner:fix-doip-test-timeout

Conversation

@BenGardiner

@BenGardiner BenGardiner commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

This pull request addresses several CI test issues across platforms:

This message was written with the help of AI (GPT-5.6-Cyber).

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.19%. Comparing base (4ca2381) to head (ecdadb2).

Files with missing lines Patch % Lines
scapy/contrib/j1939.py 89.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5234      +/-   ##
==========================================
+ Coverage   80.62%   81.19%   +0.56%     
==========================================
  Files         394      394              
  Lines       98742    98758      +16     
==========================================
+ Hits        79611    80185     +574     
+ Misses      19131    18573     -558     
Files with missing lines Coverage Δ
scapy/automaton.py 81.50% <100.00%> (+0.93%) ⬆️
scapy/layers/inet6.py 88.79% <100.00%> (+0.44%) ⬆️
scapy/contrib/j1939.py 89.86% <89.47%> (+0.13%) ⬆️

... and 31 files with indirect coverage changes

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

@BenGardiner
BenGardiner force-pushed the fix-doip-test-timeout branch from 79b4beb to 94570ca Compare October 18, 2026 00:33
Comment thread scapy/as_resolvers.py Outdated
Comment thread test/contrib/automotive/doip.uts Outdated
@BenGardiner
BenGardiner force-pushed the fix-doip-test-timeout branch from 94570ca to 09a3f46 Compare October 18, 2026 23:13
@BenGardiner
BenGardiner requested a review from polybassa October 18, 2026 23:26
@BenGardiner BenGardiner changed the title automotive, doip: increase timeout in logical addressing test automotive, inet6, automaton: stabilize CI timeouts and fix Windows select_objects Oct 19, 2026

@polybassa polybassa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Windows regression case with a negative-fileno input, an unreadable event input, and a readable event input, asserting that the unreadable input is excluded in more than one input ordering. Also cache each object’s fileno() once and append each event alongside its corresponding input mapping. This review comment was written with the help of AI (GPT-6).

BenGardiner and others added 4 commits October 22, 2026 00:45
In test/contrib/automotive/doip.uts:439, rx_sock.sr() with multi=True
used a 0.1s timeout to collect 8 pre-queued responses. On loaded CI
runners, the timeout could expire before all responses were processed.
Increase timeout to 0.5s.

AI-Assisted: yes (GPT-5.6-Cyber)
When whois resolution returns no records, AS_resolver6._resolve_one() raised
AttributeError attempting to call startswith() on None. Guard asn checks and
allow for empty/rate-limited responses in regression tests.

AI-Assisted: yes (GPT-5.6-Cyber)
…ze TLS test timeouts

In scapy/automaton.py, select_objects() on Windows handles objects with
negative file descriptors (such as PcapReader) by appending them directly
to results and omitting them from events. When WaitForMultipleObjects returns
an event index, looking up inputs[res] was offset by any preceding
negative-fileno objects, resulting in incorrect return sets. Map events
to input objects explicitly via events_to_inputs, caching each object's
fileno() once and appending each event alongside its input mapping.

In test/scapy/layers/tls/tlsclientserver.uts, increase the server accept and
client handshake request timeouts in test_tls_client_native from 1s to 5s to
avoid intermittent timeouts on CPU-throttled Windows CI runners.

In test/windows.uts, add unit test coverage for select_objects with
negative-fileno, unreadable, and readable event inputs across multiple
input orderings.

AI-Assisted: yes (GPT-5.6-Cyber)
AI-Assisted: Yes Kimi 2.7 / GPT 5.4 codex / Copilot
@BenGardiner
BenGardiner force-pushed the fix-doip-test-timeout branch from a3be136 to 9218656 Compare October 22, 2026 00:46
On Ubuntu Azure runners with newer kernels (such as 7.0.0-1017-azure),
the matching linux-modules-extra package may not exist in the package
repository, causing apt-get to fail and aborting the CI setup before tests
run. Allow linux-modules-extra installation to fail without aborting
install.sh.

AI-Assisted: yes (GPT-5.6-Cyber)
@BenGardiner
BenGardiner requested a review from polybassa October 22, 2026 01:14
@BenGardiner

Copy link
Copy Markdown
Contributor Author

Please add a Windows regression case with a negative-fileno input, an unreadable event input, and a readable event input, asserting that the unreadable input is excluded in more than one input ordering. Also cache each object’s fileno() once and append each event alongside its corresponding input mapping. This review comment was written with the help of AI (GPT-6).

good idea. how's this now?

@polybassa
polybassa merged commit 49b0361 into secdev:master Oct 22, 2026
23 checks passed
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.

3 participants