]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap test remove shutdown() calls
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 28 Aug 2018 16:10:45 +0000 (09:10 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 Aug 2018 15:29:54 +0000 (17:29 +0200)
commita91eede457d4004919d90cf8c7b65b3498c2af51
tree1f19eeeabc81e56ff6ad4a920a55901ac89d8e19
parent16ec3f4fa3351264d918ae5510dd02c1df8f2f21
bpf: sockmap test remove shutdown() calls

Currently, we do a shutdown(sk, SHUT_RDWR) on both peer sockets and
a shutdown on the sender as well. However, this is incorrect and can
occasionally cause issues if you happen to have bad timing. First
peer1 or peer2 may still be in use depending on the test and timing.
Second we really should only be closing the read side and/or write
side depending on if the test is receiving or sending.

But, really none of this is needed just remove the shutdown calls.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_sockmap.c