]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: Fix raw socket bind tests with VRF
authorDavid Ahern <dsahern@kernel.org>
Sat, 11 Dec 2021 17:21:08 +0000 (10:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 08:29:36 +0000 (09:29 +0100)
commitb46f0afa74e756a31e4e61fe48a23449dca8a3a8
treea399f1e69ef1c7a49efaf54adb80501defaa2dbc
parent7b5596e531253ce84213d9daa7120b71c9d83198
selftests: Fix raw socket bind tests with VRF

[ Upstream commit 0f108ae4452025fef529671998f6c7f1c4526790 ]

Commit referenced below added negative socket bind tests for VRF. The
socket binds should fail since the address to bind to is in a VRF yet
the socket is not bound to the VRF or a device within it. Update the
expected return code to check for 1 (bind failure) so the test passes
when the bind fails as expected. Add a 'show_hint' comment to explain
why the bind is expected to fail.

Fixes: 75b2b2b3db4c ("selftests: Add ipv4 address bind tests to fcnal-test")
Reported-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/fcnal-test.sh