• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

florianl / go-tc / 40076170815
92%

Build:
DEFAULT BRANCH: main
Ran 24 Oct 2026 07:59AM UTC
Jobs 1
Files 84
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Oct 2026 07:57AM UTC coverage: 92.357% (-0.1%) from 92.479%
40076170815

push

github

web-flow
netem: parse kind-specific extended statistics (#341)

* netem: parse kind-specific extended statistics

netem exports its extended statistics (struct tc_netem_xstats) via
TCA_STATS_APP (netem_dump_stats() calls gnet_stats_copy_app()), and
some setups expose it via TCA_XSTATS. Both paths aborted the whole
qdisc dump parse so far:

- extractXStats() had no "netem" case -> "extractXStats(): unsupported kind: netem"
- unmarshalGenStats() hit the default case for TCA_STATS_APP
  -> "unmarshalGenStats()\t4"

containerlab tools netem set/show depends on Qdisc().Get() and fails
with those messages although the netem qdisc itself is created fine.

This parses the kind-specific payload for netem on both attribute
paths (unit tests included) and keeps unknown TCA_STATS_APP payloads
without aborting the dump.

Signed-off-by: Sebastian Rieger <sebastian.rieger@informatik.hs-fulda.de>

* stats: keep TCA_STATS_APP payload out of the public API

Instead of exposing the raw TCA_STATS_APP payload as GenStats.App []byte,
buffer it while walking the attributes and parse it kind-specifically after
the whole netlink message has been walked (same pattern as TCA_XSTATS).

This also fixes an attribute-order dependency: netem dumps may carry
tcaStats2 before tcaKind, so the kind-specific parsing must not happen
inline at the tcaStats2 case.

Signed-off-by: Sebastian Rieger <sebastian.rieger@informatik.hs-fulda.de>

* q_netem: harden extractTcmsgAttributes for truncated/oversized APP payloads

- treat a zero-length APP payload as absent instead of returning
  io.ErrUnexpectedEOF
- fail on APP payloads whose declared length does not match the
  remaining message bytes
- report the truncated attribute explicitly and skip it instead of
  silently continuing
- return an error for unknown attribute kinds that carry an APP
  payload

Signed-off-by: Sebastian Rieger <sebastian.rieger@informatik.hs-fulda.de>

---------

Signed-off-by: Sebastian Rieger <sebastian.rieger@informatik.hs-fulda.de>

24 of 27 new or added lines in 4 files covered. (88.89%)

5 existing lines in 3 files now uncovered.

4882 of 5286 relevant lines covered (92.36%)

11.24 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
90.28
-3.66% stats.go
1
77.31
-1.66% tc.go

Coverage Regressions

Lines Coverage ∆ File
2
92.68
-0.06% attributeTcMsg.go
2
77.31
-1.66% tc.go
1
90.28
-3.66% stats.go
Jobs
ID Job ID Ran Files Coverage
1 40076170815.1 24 Oct 2026 07:59AM UTC 84
92.36
GitHub Action Run
Source Files on build 40076170815
  • Tree
  • List 84
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f5c446a6 on github
  • Prev Build on main (#39046409673)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc