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, 26 Oct 2022 11:16:51 +0000 (13:16 +0200)
commitaf21c7262f8bf41f04b79d53fa73085131e9618b
tree801a45cceed0df3e11b1853cd5bc721c8042ba6e
parent3e41ff977aeee66fc810440454a2503b4abeeb9d
selftests: Fix the if conditions of in test_extra_filter()

[ Upstream commit bc7a319844891746135dc1f34ab9df78d636a3ac ]

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: 3ca8e4029969 ("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