]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: parametrize skb_segment unit test to expand coverage
authorWillem de Bruijn <willemb@google.com>
Mon, 9 Oct 2023 14:41:52 +0000 (10:41 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Oct 2023 09:39:01 +0000 (10:39 +0100)
commit1b4fa28a8b07eb331aeb7fbfc806c0d2e3dc3627
tree1f361c52f3a34b061f3640b97e0aee4765f7616f
parentb3098d32ed6e6f4c03a95f14426143f1b0af620f
net: parametrize skb_segment unit test to expand coverage

Expand the test with variants

- GSO_TEST_NO_GSO:      payload size less than or equal to gso_size
- GSO_TEST_FRAGS:       payload in both linear and page frags
- GSO_TEST_FRAGS_PURE:  payload exclusively in page frags
- GSO_TEST_GSO_PARTIAL: produce one gso segment of multiple of gso_size,
                        plus optionally one non-gso trailer segment

Define a test struct that encodes the input gso skb and output segs.
Input in terms of linear and fragment lengths. Output as length of
each segment.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/gso_test.c