netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/7] selftests: bpf: break up test_progs
@ 2019-03-02  3:42 Stanislav Fomichev
  2019-03-02  3:42 ` [PATCH bpf-next v3 1/7] selftests: bpf: break up test_progs - preparations Stanislav Fomichev
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Stanislav Fomichev @ 2019-03-02  3:42 UTC (permalink / raw)
  To: netdev, bpf; +Cc: davem, ast, daniel, Stanislav Fomichev

Recently we had linux-next bpf/bpf-next conflict when we added new
functionality to the test_progs.c at the same location. Let's split
test_progs.c the same way we recently split test_verifier.c.

I follow the same patten we did in commit 2dfb40121ee8 ("selftests: bpf:
prepare for break up of verifier tests") for verifier: create
scaffolding to support dedicated files and slowly move the tests into
separate files.

The first patch adds scaffolding, subsequent patches move progs into
separate files.

In theory, many of the standalone tests can be migrated to this new
framework as well. They get the benefit of common CHECK macro and
bpf_find_map function which a lot of standalone tests need to redefine.

v3 changes:
* respin on top of commit ebace0e981b2 ("selftests/bpf: use
  __bpf_constant_htons in test_prog.c for flow dissector")
* put bpf_rlimit.h into test_progs.c instead of test_progs.h

v2 changes:
* added cover letter, added more description about file structure

Stanislav Fomichev (7):
  selftests: bpf: break up test_progs - preparations
  selftests: bpf: break up test_progs - pkt access
  selftests: bpf: break up test_progs - xdp
  selftests: bpf: break up test_progs - stackmap
  selftests: bpf: break up test_progs - tracepoint
  selftests: bpf: break up test_progs - spinlock
  selftests: bpf: break up test_progs - misc

 tools/testing/selftests/bpf/Makefile          |   27 +-
 .../selftests/bpf/prog_tests/.gitignore       |    1 +
 .../selftests/bpf/prog_tests/bpf_obj_id.c     |  249 ++
 .../selftests/bpf/prog_tests/flow_dissector.c |   72 +
 .../bpf/prog_tests/get_stack_raw_tp.c         |  139 ++
 .../selftests/bpf/prog_tests/l4lb_all.c       |   90 +
 .../selftests/bpf/prog_tests/map_lock.c       |   75 +
 .../selftests/bpf/prog_tests/obj_name.c       |   71 +
 .../selftests/bpf/prog_tests/pkt_access.c     |   29 +
 .../selftests/bpf/prog_tests/pkt_md_access.c  |   24 +
 .../selftests/bpf/prog_tests/prog_run_xattr.c |   49 +
 .../bpf/prog_tests/queue_stack_map.c          |  103 +
 .../bpf/prog_tests/reference_tracking.c       |   48 +
 .../selftests/bpf/prog_tests/signal_pending.c |   48 +
 .../selftests/bpf/prog_tests/spinlock.c       |   29 +
 .../bpf/prog_tests/stacktrace_build_id.c      |  165 ++
 .../bpf/prog_tests/stacktrace_build_id_nmi.c  |  150 ++
 .../selftests/bpf/prog_tests/stacktrace_map.c |  103 +
 .../bpf/prog_tests/stacktrace_map_raw_tp.c    |   59 +
 .../bpf/prog_tests/task_fd_query_rawtp.c      |   78 +
 .../bpf/prog_tests/task_fd_query_tp.c         |   82 +
 .../selftests/bpf/prog_tests/tcp_estats.c     |   19 +
 .../bpf/prog_tests/tp_attach_query.c          |  132 ++
 tools/testing/selftests/bpf/prog_tests/xdp.c  |   46 +
 .../bpf/prog_tests/xdp_adjust_tail.c          |   31 +
 .../selftests/bpf/prog_tests/xdp_noinline.c   |   82 +
 tools/testing/selftests/bpf/test_progs.c      | 2043 +----------------
 tools/testing/selftests/bpf/test_progs.h      |   93 +
 28 files changed, 2108 insertions(+), 2029 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/.gitignore
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/flow_dissector.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/l4lb_all.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/map_lock.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/obj_name.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/pkt_access.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/pkt_md_access.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/prog_run_xattr.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/reference_tracking.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/signal_pending.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/spinlock.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/stacktrace_map.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/stacktrace_map_raw_tp.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/task_fd_query_rawtp.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/task_fd_query_tp.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/tcp_estats.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/tp_attach_query.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
 create mode 100644 tools/testing/selftests/bpf/test_progs.h

-- 
2.21.0.352.gf09ad66450-goog

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-02 19:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02  3:42 [PATCH bpf-next v3 0/7] selftests: bpf: break up test_progs Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 1/7] selftests: bpf: break up test_progs - preparations Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 2/7] selftests: bpf: break up test_progs - pkt access Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 3/7] selftests: bpf: break up test_progs - xdp Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 4/7] selftests: bpf: break up test_progs - stackmap Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 5/7] selftests: bpf: break up test_progs - tracepoint Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 6/7] selftests: bpf: break up test_progs - spinlock Stanislav Fomichev
2019-03-02  3:42 ` [PATCH bpf-next v3 7/7] selftests: bpf: break up test_progs - misc Stanislav Fomichev
2019-03-02 19:16 ` [PATCH bpf-next v3 0/7] selftests: bpf: break up test_progs Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).