Skip to content

add skb_segment kunit coverage

Willem de Bruijn netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 0 repliesSuperseded
  3. v13 patches 5 repliesSuperseded

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: add skb_segment kunit testnet/Kconfig net/core/Makefile net/core/gso_test.c+97 -00 repliesApplied
2/3net: parametrize skb_segment unit test to expand coveragenet/core/gso_test.c+112 -170 repliesApplied
3/3net: expand skb_segment unit test with frag_list coveragenet/core/gso_test.c+92 -00 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchFlorian Westphal
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] add skb_segment kunit coverage

From: Willem de Bruijn <[email protected]>

As discussed at netconf last week. Some kernel code is exercised in many different ways. skb_segment is a prime example. This ~350 line function has 49 different patches in git blame with 28 different authors.

When making a change, e.g., to fix a bug in one specific use case, it is hard to establish through analysis alone that the change does not break the many other paths through the code. It is impractical to exercise all code paths through regression testing from userspace.

Add the minimal infrastructure needed to add KUnit tests to networking, and add code coverage for this function.

Patch 1 adds the infra and the first simple test case: a linear skb Patch 2 adds variants with frags[]
Patch 3 adds variants with frag_list skbs

Changelog in the individual patches.

Willem de Bruijn (3):
net: add skb_segment kunit test
net: parametrize skb_segment unit test to expand coverage
net: expand skb_segment unit test with frag_list coverage

 net/Kconfig         |   9 ++
 net/core/Makefile   |   1 +
 net/core/gso_test.c | 274 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 284 insertions(+)
 create mode 100644 net/core/gso_test.c
Signature · 1 line
2.42.0.609.gbb76f46606-goog