Repository navigation
test: exercise option type 0x23 in the SMF_DPD truncation loop (#1771) - #1776
Merged
Merged
Conversation
The type loop in test_smf_dpd_truncated_len_unit.py skipped
RPL_Option_0x23 through EXCLUDED = {0x23}, citing #1196 as the cause
of an unrelated failure. #1196 is closed by #1197 and #1198, and both
HOPOPT and IPv6_Opts given PREFIX + b'\x23\x00' now raise the library
ProtocolError ("runs past the end of the data"), so the exclusion only
hid two subtests that pass.
Drop EXCLUDED, its comment and the skip, so the loop covers all 256
option types for both protocols: 512 loop subtests, up from 510.
Checked by mutation: making the RPL sub-TLV length callable raise a
TypeError for type 0x23 fails exactly the two 0x23 subtests here,
while the origin/main version of the test still passes. Restoring the
#1196 registry bug is not caught here, as the truncation error fires
before reader dispatch; test_rpl_option_unit.py covers that one.
The docstring-contract line reference is fixed in #1103 round 2.
Closes #1771
Owner
Author
|
Verdict: GOOD TO GO at |
Contributor
|
Coverage: 89.59% (unit tier, Python 3.15,
Per-file detail: the |
This was referenced Oct 15, 2026
JarryShaw
added a commit
that referenced
this pull request
Oct 15, 2026
…1803) Entries: - add #1791 (breaking: pack() leaves its instance unchanged), #1778 (Protocol in protocol.__all__), #1781 (PortEnumField miss with a nameless proto), #1779 (vendor.ipx _path), #1780 (examples READMEs to Markdown, build leftovers) and #1790 (36 ambiguous cross-references) - fold #1776 into the RPL 0x23 entry and #1381 into the dump-schema one Accuracy: - the benchmark and legacy_smoke READMEs are README.md since #1780 - EngineBase stays out of __all__, as #1016 settled - the #575 peek calls get() only once the value resolves - the #647 and #764 entries point at #775/#860, under which nothing mints - the #861 entry names #869 and #874 for the EnumRegistry move Figures: - preamble: 685 citations, #340 to #1791 - process.rst pin: 298 entries; CHANGELOG.md regenerated Refs #1103
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.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the change. Narrow runs only, listed below.Added a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible: N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseSummary
The type loop in
tests/protocols/internet/test_smf_dpd_truncated_len_unit.pyskippedRPL_Option_0x23viaEXCLUDED = {0x23}, citing #1196. That bug is fixed: HOPOPT and IPv6_Opts givenPREFIX + b'\x23\x00'now raise the libraryProtocolError. So the exclusion only hid two passing subtests. This PR drops it, and the loop covers all 256 types for both protocols (512 subtests, up from 510).TypeErrorfor 0x23 fails exactly the two 0x23 subtests; theorigin/maintest passes it.2 passed, 514 subtests passed;tests/projectexit 0; adjacent RPL/SMF_DPD/IPv6-options files95 passed, 816 subtests passed.Closes #1771