Skip to content

test(utilities): the excepthook tests' 30-second subprocess timeout trips on GraalPy's slow start (#3246) - #3248

Merged
JarryShaw merged 1 commit into
developfrom
test/3246-scale-subprocess-timeouts
Nov 30, 2026
Merged

JarryShaw merged 1 commit into
developfrom
test/3246-scale-subprocess-timeouts

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Please follow the guide below

  • Put an x into every box [ ] that applies to your pull request (like this: [x])

  • Use the Preview tab to see how your pull request will look

  • Searched for similar pull requests

  • Followed the coding style (make pylint, make mypy, make isort)

  • make test passes, and a test case covers the change

  • Described the user-visible change below and left its changelog entry to the maintainer, keeping docs/source/changelog/ and CHANGELOG.md out of the diff, if the change is user-visible: N/A — centralised

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect

  • feat — adds a feature

  • perf — changes performance, not behaviour

  • refactor — changes neither behaviour nor performance

  • test — tests only

  • docs — documentation only

  • ci — workflows or build tooling

  • release — bumps the version or rolls up a distribution

  • chore — anything else

  • Also tick if it regenerates constant or registry tables, members keeping their numeric values (the const label)


Description of your pull request and other information

Closes #3246.

  • run_in_subprocess in tests/utilities/test_exceptions_excepthook.py gives each child scale_timeout(TIMEOUT), TIMEOUT = 120, the start-up allowance tests/foundation/test_extraction_no_eof.py gives GraalPy (test: test_extraction_no_eof fails intermittently on GraalPy #2085). The failing test's child imports pcapkit twice, which makes it the module's slowest.
  • Every other literal subprocess hang guard under tests/ goes through scale_timeout too, as do ProbeWriterMutexTests' wait for its child to start and the asyncio.wait_for on a process in test_pyshark_lost_exit_status_2633_unit.py's child program. Left literal: tests/_tiers.py's _git, since that module never imports tests._support and its timeout only reads as "cannot tell"; tests/utilities/test_config_unit.py's, since feat(utilities): a PCAPKIT_MIMIC switch that follows Wireshark, dpkt or Scapy where each departs from an RFC pcapkit honours (#3230) #3240 holds that file; and in-process thread and event waits.
  • No workflow change: a GraalPy-leg PCAPKIT_TEST_TIMEOUT_SCALE would also stretch every time_limit deadline, which test: test_extraction_no_eof fails intermittently on GraalPy #2085 kept apart from start-up. On GraalPy 25.4.4, a cold import pcapkit.utilities.exceptions took 5.7 s idle, 7.2–7.5 s on 4 contended CPUs and 10.8–13.0 s beside three GraalPy workers. On 2 contended CPUs the module failed the issue's test at a 30 s deadline (30.13 s) and passed at 120 s.

Tests: the new ChildDeadlineTests fails on an origin/develop export (30 != 120, 30 != 300.0). Under a malformed scale, 103 of the 114 converted sites in module code raised its ValueError; the rest sit behind an earlier scaled call in the same test or in a test skipped on 3.14, and the pyshark child program raised it when run on its own. The touched modules, tests/project, tests/protocols/*.py and tests/*.py pass.

@github-actions github-actions Bot added this to the PyPCAPKit v1.10 milestone Nov 30, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 30, 2026
@JarryShaw JarryShaw added the test Pull requests that add or correct tests (test: subject prefix) label Nov 30, 2026
@JarryShaw JarryShaw added the review: running A cross-review is in flight against the current head - no verdict yet label Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Coverage: 94.98% (unit tier, Python 3.15, 3deb19826, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 116 4 20 2 95.59%
pcapkit/const 22386 224 3186 191 98.28%
pcapkit/corekit 3160 83 1058 40 96.85%
pcapkit/dumpkit 423 3 148 5 98.60%
pcapkit/foundation 4350 24 1364 26 99.12%
pcapkit/interface 112 4 40 3 95.39%
pcapkit/protocols 28992 153 7680 128 99.22%
pcapkit/toolkit 1273 35 470 9 96.67%
pcapkit/utilities 639 7 176 5 98.53%
pcapkit/vendor 6575 2396 1478 258 60.24%

Per-file detail: the coverage-html artifact of this run.

…rips on GraalPy's slow start (#3246)

- The excepthook tests' children get scale_timeout(TIMEOUT), TIMEOUT = 120:
  each imports pcapkit afresh, and 30 seconds expired on a loaded GraalPy
  runner. 120 is the start-up allowance test_extraction_no_eof gives GraalPy.
- Every other literal subprocess hang guard under tests/ goes through
  scale_timeout too, as does ProbeWriterMutexTests' wait for its child to
  start, so PCAPKIT_TEST_TIMEOUT_SCALE stretches them all. tests/_tiers.py's
  _git keeps its literal: that module never imports tests._support.
- ChildDeadlineTests pins the child's deadline and its scale.
@JarryShaw
JarryShaw force-pushed the test/3246-scale-subprocess-timeouts branch from 01d67d1 to 3deb198 Compare November 30, 2026 07:17
@JarryShaw

Copy link
Copy Markdown
Owner Author

Good to go at 3deb19826, from a Sonnet cross-review plus my check of the fix round.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Nov 30, 2026
@JarryShaw
JarryShaw merged commit 8cf576a into develop Nov 30, 2026
36 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 30, 2026
@JarryShaw
JarryShaw deleted the test/3246-scale-subprocess-timeouts branch November 30, 2026 14:11
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test(utilities): the excepthook tests' 30-second subprocess timeout trips on GraalPy's slow start

1 participant