mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
net: mctp: usblib: Add to parameterized kunit tests.
Add parameterized tests to cover worst case scenarios for packet splitting and length. Signed-off-by: James Lee <james@codeconstruct.com.au> Link: https://patch.msgid.link/20261014-dev-mctp-usb-lib-test-v3-1-ee5bc3ea1db1@codeconstruct.com.au Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
56c7aa17f0
commit
acfb9c263d
|
|
@ -386,12 +386,18 @@ static const struct mctp_usblib_test_pkt_span mctp_usblib_test_pkt_spans[] = {
|
|||
{ "1p2x-split-mctphdr", 1, { 16 }, 2, { 6, 10 } },
|
||||
/* Single packet split over 3 transfers, middle entirely continuation */
|
||||
{ "1p3x-split", 1, { 12 }, 3, { 4, 4, 4 } },
|
||||
/* A packet split over 5 transfers, splitting on and between each header. */
|
||||
{ "1p5x-split", 1, { 12 }, 5, { 3, 1, 1, 3, 4}},
|
||||
/* Max-sized single transfer */
|
||||
{ "1p1x-large", 1, { 8191 }, 1, { 8191 } },
|
||||
/* Two large packets, split at the worst-case for allocation, with a
|
||||
* single byte continuing the span
|
||||
*/
|
||||
{ "2p2x-large-split", 2, { 8190, 8190 }, 2, { 8191, 8189 } },
|
||||
{ "2p2x-large-split", 2, { 8190, 8191 }, 2, { 8191, 8190 } },
|
||||
/* Three large packets, split at the worst-case for allocation,
|
||||
* with a single byte continuing each span
|
||||
*/
|
||||
{ "3p3x-large-split", 3, { 8190, 8191, 8191 }, 3, { 8191, 8191, 8190 } },
|
||||
};
|
||||
|
||||
KUNIT_ARRAY_PARAM(mctp_usblib_test_rx_pkt_span, mctp_usblib_test_pkt_spans,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user