On 4/7/24 6:36 PM, Geliang Tang wrote:
From: Geliang Tang <tanggeliang@xxxxxxxxxx> Incorrect arguments are passed to fcntl() in test_sockmap.c when invoking it to set file status flags. If O_NONBLOCK is used as 2nd argument and passed into fcntl, -EINVAL will be returned (See do_fcntl() in fs/fcntl.c). The correct approach is to use F_SETFL as 2nd argument, and O_NONBLOCK as 3rd one. In nonblock mode, if EWOULDBLOCK is received, continue receiving, otherwise some subtests of test_sockmap will fail. Fixes: 16962b2404ac ("bpf: sockmap, add selftests") Signed-off-by: Geliang Tang <tanggeliang@xxxxxxxxxx>
Acked-by: Yonghong Song <yonghong.song@xxxxxxxxx>