Skip to content

Commit

Permalink
test: net: net_pkt: use var buffer pool for testing
Browse files Browse the repository at this point in the history
From change 47eb592c28b9e7dfbdd25fedbf07a528ad240084 net_buf structures
allocated from pools defined with NET_BUF_POOL_FIXED_DEFINE() will keep
their `size` member set to the actual fixed size and not requested
size like before.

For this set of tests NET_BUF_POOL_FIXED_DEFINE() for several test
cases. These tests check the several values based on a fact that the
network buffer's size was set to the requested size.

This commit changes definition of the buffer pool to
NET_BUF_POOL_FIXED_DEFINE() in order to satisfy these expectations.
This change does not impact the tests themselves.

Signed-off-by: Konrad Derda <[email protected]>
  • Loading branch information
kderda committed Feb 5, 2024
1 parent 79bbe8f commit 69d514f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/net/net_pkt/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ ZTEST(net_pkt_test_suite, test_net_pkt_headroom)
net_pkt_unref(pkt);
}

NET_BUF_POOL_FIXED_DEFINE(test_net_pkt_headroom_copy_pool, 2, 4, 4, NULL);
NET_BUF_POOL_VAR_DEFINE(test_net_pkt_headroom_copy_pool, 2, 128, 4, NULL);

ZTEST(net_pkt_test_suite, test_net_pkt_headroom_copy)
{
Expand Down

0 comments on commit 69d514f

Please sign in to comment.