Skip to content

selftests for BPF sockmap use cases

John Fastabend netdev 1 version Applied

Status from this message: Applied to bpf-next, thanks John!

Get series with b4
b4 am 20180423212506.20332.6762.stgit@john-Precision-Tower-5810

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4bpf: sockmap, code sockmap_test in Csamples/sockmap/sockmap_user.c+113 -960 replies
2/4bpf: sockmap, add a set of tests to run by defaultsamples/sockmap/sockmap_user.c+512 -510 replies
3/4bpf: sockmap, add selfteststools/include/uapi/linux/bpf.h tools/include/uapi/linux/if_link.h tools/lib/bpf/libbpf.c +4 more+1852 -40 replies
4/4bpf: sockmap, remove samples programsamples/sockmap/Makefile samples/sockmap/sockmap_kern.c samples/sockmap/sockmap_test.sh +1 more+0 -22760 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [bpf-next PATCH 0/4] selftests for BPF sockmap use cases

This series moves ./samples/sockmap into BPF selftests. There are a few good reasons to do this. First, by pushing this into selftests the tests will be run automatically. Second, sockmap was not really a sample of anything anymore, but rather a large set of tests.

Note: There are three recent fixes outstanding against bpf branch that can be detected occosionally by the automated tests here.

https://patchwork.ozlabs.org/patch/903138/
https://patchwork.ozlabs.org/patch/903139/
https://patchwork.ozlabs.org/patch/903140/

---

John Fastabend (4):
bpf: sockmap, code sockmap_test in C
bpf: sockmap, add a set of tests to run by default
bpf: sockmap, add selftests
bpf: sockmap, remove samples program

 samples/sockmap/Makefile                        |   75 -
 samples/sockmap/sockmap_kern.c                  |  341 -----
 samples/sockmap/sockmap_test.sh                 |  488 --------
 samples/sockmap/sockmap_user.c                  |  894 --------------
 tools/include/uapi/linux/bpf.h                  |    1 
 tools/include/uapi/linux/if_link.h              |   39 +
 tools/lib/bpf/libbpf.c                          |    4 
 tools/lib/bpf/libbpf.h                          |    2 
 tools/testing/selftests/bpf/Makefile            |    5 
 tools/testing/selftests/bpf/test_sockmap.c      | 1465 +++++++++++++++++++++++
 tools/testing/selftests/bpf/test_sockmap_kern.c |  340 +++++
 11 files changed, 1852 insertions(+), 1802 deletions(-)
 delete mode 100644 samples/sockmap/Makefile
 delete mode 100644 samples/sockmap/sockmap_kern.c
 delete mode 100755 samples/sockmap/sockmap_test.sh
 delete mode 100644 samples/sockmap/sockmap_user.c
 create mode 100644 tools/testing/selftests/bpf/test_sockmap.c
 create mode 100644 tools/testing/selftests/bpf/test_sockmap_kern.c