]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Fix SENDPAGE data logic in test_sockmap
authorZijian Zhang <zijianzhang@bytedance.com>
Wed, 6 Nov 2024 22:25:14 +0000 (22:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:50:57 +0000 (19:50 +0100)
commitd0e5847929a273ad9cc3a6b4c5b3b8f7ff892735
treed9d581892a8c55f610f5f1bbad1f99d63097c156
parent72fb93bb48b4047cb3657dc9ea2d06d04e78e719
selftests/bpf: Fix SENDPAGE data logic in test_sockmap

[ Upstream commit 4095031463d4e99b534d2cd82035a417295764ae ]

In the SENDPAGE test, "opt->iov_length * cnt" size of data will be sent
cnt times by sendfile.
1. In push/pop tests, they will be invoked cnt times, for the simplicity of
msg_verify_data, change chunk_sz to iov_length
2. Change iov_length in test_send_large from 1024 to 8192. We have pop test
where txmsg_start_pop is 4096. 4096 > 1024, an error will be returned.

Fixes: 328aa08a081b ("bpf: Selftests, break down test_sockmap into subtests")
Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20241106222520.527076-3-zijianzhang@bytedance.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/test_sockmap.c