Geliang Tang de1b5ea789 selftests/bpf: Check length of recv in test_sockmap
The value of recv in msg_loop may be negative, like EWOULDBLOCK, so it's
necessary to check if it is positive before accumulating it to bytes_recvd.

Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/5172563f7c7b2a2e953cef02e89fc34664a7b190.1716446893.git.tanggeliang@kylinos.cn
2024-06-03 19:32:55 +02:00
..
2024-04-25 20:56:15 -07:00
2024-04-23 13:16:03 +02:00
2024-05-28 07:27:29 -07:00
2024-03-26 11:07:21 -07:00