]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftest/bpf: Adapt vsock_delete_on_close to sockmap rejecting unconnected
authorMichal Luczaj <mhal@rbox.co>
Thu, 13 Feb 2025 11:58:51 +0000 (12:58 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Feb 2025 11:00:01 +0000 (12:00 +0100)
commit8350695bfb169b1924626a68f76b369ad01f18f2
tree66ac6fc2c53bf050cf78ee17d6e8933efc022c85
parent857ae05549ee2542317e7084ecaa5f8536634dd9
selftest/bpf: Adapt vsock_delete_on_close to sockmap rejecting unconnected

Commit 515745445e92 ("selftest/bpf: Add test for vsock removal from sockmap
on close()") added test that checked if proto::close() callback was invoked
on AF_VSOCK socket release. I.e. it verified that a close()d vsock does
indeed get removed from the sockmap.

It was done simply by creating a socket pair and attempting to replace a
close()d one with its peer. Since, due to a recent change, sockmap does not
allow updating index with a non-established connectible vsock, redo it with
a freshly established one.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c