Skip to content

test: generate FRAD's NLPID map and the ICMP type registries - #2612

Merged
JarryShaw merged 1 commit into
mainfrom
test/2560-dispatch-generators
Nov 2, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
test/2560-dispatch-generators

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • test — tests only

Description of your pull request and other information

The dispatch generators now cover FRAD's NLPID map and the ICMP type registries.

  • FRAD: examples/generators/dispatch.py gains a frad family and PINNED_TARGETS entries. Both of FRAD's entries, 0xCC to IPv4 and 0x8E to IPv6, are reached through LinuxSLL and parsed to TCP.
  • ICMP: examples/generators/options.py gains ICMPv4 and ICMPv6 type families, covering every __type__ entry.
  • Count guard: the count in test_cases_cover_every_table_named_in_the_issue goes up exactly.

A mutation check shows the new cases fail when the dispatch they pin is broken. test_option_generator_icmp_2560_unit also catches a retarget between two types with the same layout, which the round trip alone cannot see. The ICMP families write no capture, so the existing option fixtures stay unchanged.

The held radiotap (#2607) and DCCP (#2593) branches append to the same tables, so whichever merges later resolves a trivial conflict. #2592 tracks LinuxSLL's own registry and the test-coverage.rst gap this exposed.

Closes #2560

@JarryShaw JarryShaw added test Pull requests that add or correct tests (test: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Nov 1, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at fd9d47ddb (Sonnet review). Every FRAD NLPID and every ICMPv4/ICMPv6 type is generated. The count guard went up exactly, not loosened. The mutation check binds, the round-trip suites pass, and the option fixtures are unchanged. The diff touches no pcapkit/ code.

@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Coverage: 94.04% (unit tier, Python 3.15, fd9d47ddb, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20093 144 2712 125 98.78%
pcapkit/corekit 2605 74 818 37 96.52%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3360 27 1186 32 98.70%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 20346 220 5370 197 98.36%
pcapkit/toolkit 961 28 342 10 96.32%
pcapkit/utilities 506 7 144 5 98.15%
pcapkit/vendor 5009 2222 1148 182 52.31%

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

@github-actions github-actions Bot added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

resolve conflicts

@JarryShaw

Copy link
Copy Markdown
Owner Author

On it. A rebase onto main is starting. It keeps both sides of dispatch.py, options.py and the count guard, with this PR's FRAD and ICMP families next to the DCCP families that just landed. I'll push it with a lease and post the rebase note here.

…es (#2560)

- dispatch.py: a `frad` family over `FRAD.__proto__`, probing each NLPID
  through a LINUX_SLL capture with `arphrd_type` FRAD, and `PINNED_TARGETS`
  entries for both codes; `test_cases_cover_every_table_named_in_the_issue`
  counts them.
- options.py: `icmpv4-type` and `icmpv6-type` families over `ICMPv4.__type__`
  and `ICMPv6.__type__`, with non-degenerate echo, quoted-packet, pointer and
  MTU arguments; neither writes a capture.
- test_option_generator_icmp_2560_unit: pins each generated message's data
  model and body against RFC 792 and RFC 4443, which catches a retarget
  between two types of the same layout that the round trip cannot see.
@JarryShaw
JarryShaw force-pushed the test/2560-dispatch-generators branch from fd9d47d to 1ef0195 Compare November 2, 2026 02:38
@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main (3ccdc3271) to resolve the conflict, as asked: fd9d47ddb → 1ef0195fe.

  • examples/generators/options.py: DCCP's section from main and this PR's ICMP/ICMPv6 section are both kept, one after the other.
  • test_cases_cover_every_table_named_in_the_issue: the total is now 59 (main's 57 plus FRAD's two NLPIDs), with 'internet': 21 and 'frad': 2. The comment names both sources.
  • Outside the resolved files the patch-id is unchanged (f32f9657). The 11 dispatch/generator/conventions modules pass. The verdict stays good-to-go.

@JarryShaw
JarryShaw merged commit e789677 into main Nov 2, 2026
59 checks passed
@JarryShaw
JarryShaw deleted the test/2560-dispatch-generators branch November 2, 2026 02:53
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 2, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 2, 2026
JarryShaw added a commit that referenced this pull request Nov 2, 2026
…s latest wave into 1.6.0 (#2449)

- Added: every whole HTTP/2 frame in a TCP segment is a further HTTPv2
  layer, the previous frame's payload, as with TLS (#2609).
- Folded into unreleased entries: SSLv3 lives in
  pcapkit.protocols.application.sslv3 (#2602), and a reassembled DTLS
  Datagram's packet holds the deferred handshake decode (#2605).
  tls.SSLv3 is in no release tag, so the entry records no move.
- Changed: the remaining xdist jobs at -n logical (#2606) join the CI
  entry, and the member-order entry cites the last reorder (#2613).
- No entry for the test-only #2611 and #2612, or for #2610's private
  registry sentinel, which changes no behaviour.
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
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: the dispatch generators skip FRAD's NLPID map and ICMP's type registries

1 participant