Skip to content

Capture packets in the conformance CI job - #455

Merged
jadamcrain merged 2 commits into
mainfrom
conformance-pcap
Oct 10, 2026
Merged

jadamcrain merged 2 commits into
mainfrom
conformance-pcap

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

dnp4s can save a pcap of each procedure's traffic, linked from the report, but nothing has exercised that. This PR turns it on in CI.

Changes

  • Capture on: before the run, CI appends tcp.capture.adapter = /127.0.0.1 (the loopback adapter) to device.ini. Capturing needs root, and the tests already run under sudo. Local runs without root are unaffected, because the option is only set in CI.
  • New check step: every procedure that ran (result=pass or result=fail) must have a dump.pcap larger than its 24-octet header. Skipped procedures are ignored, since they send no traffic.
  • Upload: the pcaps go up with the rest of conformance/results, so the report's "pcap" links work in the artifact.

The capture path hasn't been run in a long time (pcap4j through JNA, now on Java 21), so this run is the first real test of it.

dnp4s can write a pcap of each procedure's traffic, linked from the
report, but nothing exercised it. CI now sets tcp.capture.adapter to
the loopback adapter (capturing needs root, which the tests already run
as) and checks that every procedure that ran captured packets. The
pcaps are uploaded with the rest of the results.
A procedure can pass without sending anything, e.g. 6.4.2 when the
outstation doesn't request link confirmations, and then its capture is
rightly empty. Check the procedures whose log shows a transmitted frame.
@jadamcrain
jadamcrain merged commit 32dca42 into main Oct 10, 2026
34 checks passed
@jadamcrain
jadamcrain deleted the conformance-pcap branch October 10, 2026 22:37
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.

1 participant