Repository navigation
test(foundation): retry a pyshark engine run once on a tshark crash (#1534) - #1536
Merged
Merged
Conversation
…1534) tshark sometimes exits 255 on a capture it reads cleanly on a rerun, and pyshark raises TSharkCrashException. The engine agreement module caches one run per engine and capture, so that one crash failed all nine pyshark aspects of the capture. - _run retries a run whose error is a TSharkCrashException once, matched by class name so the module still imports without pyshark, and logs the retry with a RuntimeWarning; a crash that persists stays an ERROR. - test_engine_agreement_retry_unit.py stubs pcapkit.extract: one crash then success is OK with the retry logged, two crashes are ERROR after two runs, and any other exception is not retried.
Owner
Author
|
Verdict: GOOD TO GO at
Not reproduced: the flake itself, across 806 serial runs on py3.11 with tshark 4.6.9. The evidence that the retry cures it is the author's observed crash-then-pass. Nits:
|
Contributor
|
Coverage: 90.08% (unit tier, Python 3.14,
Per-file detail: the |
4 of 13 tasks
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the change (selections only, listed below)What is the purpose of your pull request?
test— tests onlyDescription of your pull request and other information
_runintest_engine_agreement_runtime.pyretries a run whose error is aTSharkCrashExceptiononce (matched by class name), with aRuntimeWarning; a persistent crash staysERROR. NoGaprow or skip rule changes.New
test_engine_agreement_retry_unit.pystubspcapkit.extract: one crash →OK+ warning, two →ERRORafter two runs,ValueError→ not retried. Onorigin/mainthe first two fail.Ran: new test,
tests/foundation/engines,tests/project,tests/test_tier_guard.py(Python 3.14), and the agreement module 6× under Python 3.11 with pyshark: one run hit a real crash onipv4.pcap, retried, and passed.Closes #1534