]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: Fix the if conditions of in test_extra_filter()
authorWang Yufen <wangyufen@huawei.com>
Fri, 23 Sep 2022 07:02:37 +0000 (15:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:37:45 +0000 (10:37 +0200)
commit7a39bf3dc9217992f38b35d36e9cd677a0ea07e4
treeffe4e6c6eb2071aea8e9c477206c0966c54ae2a7
parent6b10cc5c13a537419e368a7f50d4bd55c6c8fc8c
selftests: Fix the if conditions of in test_extra_filter()

[ Upstream commit b29c229a74237dd7bbf47bf8dc10ae22ec18ae33 ]

The socket 2 bind the addr in use, bind should fail with EADDRINUSE. So
if bind success or errno != EADDRINUSE, testcase should be failed.

Fixes: e102736317c7 ("soreuseport: BPF selection functional test")
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Link: https://lore.kernel.org/r/1663916557-10730-1-git-send-email-wangyufen@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/reuseport_bpf.c