lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190302034219.99480-1-sdf@google.com>
Date:   Fri,  1 Mar 2019 19:42:12 -0800
From:   Stanislav Fomichev <sdf@...gle.com>
To:     netdev@...r.kernel.org, bpf@...r.kernel.org
Cc:     davem@...emloft.net, ast@...nel.org, daniel@...earbox.net,
        Stanislav Fomichev <sdf@...gle.com>
Subject: [PATCH bpf-next v3 0/7] selftests: bpf: break up test_progs

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ