All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/4] migrate from bpf_prog_test_run{,_xattr}
@ 2022-02-02 23:54 Delyan Kratunov
  2022-02-02 23:54 ` [PATCH bpf-next v3 1/4] selftests/bpf: migrate from bpf_prog_test_run Delyan Kratunov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Delyan Kratunov @ 2022-02-02 23:54 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel; +Cc: Delyan Kratunov

Fairly straight-forward mechanical transformation from bpf_prog_test_run
and bpf_prog_test_run_xattr to the bpf_prog_test_run_opts goodness.

I did a fair amount of drive-by CHECK/CHECK_ATTR cleanups as well, though
certainly not everything possible. Primarily, I did not want to just change
arguments to CHECK calls, though I had to do a bit more than that
in some cases (overall, -119 CHECK calls and all CHECK_ATTR calls).

v2 -> v3:
Don't introduce CHECK_OPTS, replace CHECK/CHECK_ATTR usages we need to touch
with ASSERT_* calls instead.
Don't be prescriptive about the opts var name and keep old names where that would
minimize unnecessary code churn.
Drop _xattr-specific checks in prog_run_xattr and rename accordingly.

v1 -> v2:
Split selftests/bpf changes into two commits to appease the mailing list.


Delyan Kratunov (4):
  selftests/bpf: migrate from bpf_prog_test_run
  selftests/bpf: migrate from bpf_prog_test_run_xattr
  bpftool: migrate from bpf_prog_test_run_xattr
  libbpf: Deprecate bpf_prog_test_run_xattr and bpf_prog_test_run

 tools/bpf/bpftool/prog.c                      |   5 +-
 tools/lib/bpf/bpf.h                           |   4 +-
 .../selftests/bpf/prog_tests/atomics.c        |  72 +++---
 .../testing/selftests/bpf/prog_tests/bpf_nf.c |  10 +-
 .../selftests/bpf/prog_tests/check_mtu.c      |  38 +--
 .../selftests/bpf/prog_tests/cls_redirect.c   |  10 +-
 .../selftests/bpf/prog_tests/dummy_st_ops.c   |  27 +-
 .../selftests/bpf/prog_tests/fentry_fexit.c   |  24 +-
 .../selftests/bpf/prog_tests/fentry_test.c    |   7 +-
 .../selftests/bpf/prog_tests/fexit_bpf2bpf.c  |  32 ++-
 .../selftests/bpf/prog_tests/fexit_stress.c   |  22 +-
 .../selftests/bpf/prog_tests/fexit_test.c     |   7 +-
 .../selftests/bpf/prog_tests/flow_dissector.c |  31 ++-
 .../prog_tests/flow_dissector_load_bytes.c    |  24 +-
 .../selftests/bpf/prog_tests/for_each.c       |  32 ++-
 .../bpf/prog_tests/get_func_args_test.c       |  12 +-
 .../bpf/prog_tests/get_func_ip_test.c         |  10 +-
 .../selftests/bpf/prog_tests/global_data.c    |  24 +-
 .../bpf/prog_tests/global_func_args.c         |  13 +-
 .../selftests/bpf/prog_tests/kfree_skb.c      |  16 +-
 .../selftests/bpf/prog_tests/kfunc_call.c     |  46 ++--
 .../selftests/bpf/prog_tests/ksyms_module.c   |  23 +-
 .../selftests/bpf/prog_tests/l4lb_all.c       |  35 ++-
 .../selftests/bpf/prog_tests/map_lock.c       |  15 +-
 .../selftests/bpf/prog_tests/map_ptr.c        |  16 +-
 .../selftests/bpf/prog_tests/modify_return.c  |  33 +--
 .../selftests/bpf/prog_tests/pkt_access.c     |  26 +-
 .../selftests/bpf/prog_tests/pkt_md_access.c  |  14 +-
 .../selftests/bpf/prog_tests/prog_run_opts.c  |  77 ++++++
 .../selftests/bpf/prog_tests/prog_run_xattr.c |  83 ------
 .../bpf/prog_tests/queue_stack_map.c          |  46 ++--
 .../bpf/prog_tests/raw_tp_test_run.c          |  64 ++---
 .../bpf/prog_tests/raw_tp_writable_test_run.c |  16 +-
 .../selftests/bpf/prog_tests/signal_pending.c |  23 +-
 .../selftests/bpf/prog_tests/skb_ctx.c        |  81 +++---
 .../selftests/bpf/prog_tests/skb_helpers.c    |  16 +-
 .../selftests/bpf/prog_tests/sockmap_basic.c  |  20 +-
 .../selftests/bpf/prog_tests/spinlock.c       |  14 +-
 .../selftests/bpf/prog_tests/syscall.c        |  10 +-
 .../selftests/bpf/prog_tests/tailcalls.c      | 238 +++++++++---------
 .../selftests/bpf/prog_tests/test_profiler.c  |  14 +-
 .../bpf/prog_tests/test_skb_pkt_end.c         |  15 +-
 .../testing/selftests/bpf/prog_tests/timer.c  |   7 +-
 .../selftests/bpf/prog_tests/timer_mim.c      |   7 +-
 .../selftests/bpf/prog_tests/trace_ext.c      |  28 ++-
 tools/testing/selftests/bpf/prog_tests/xdp.c  |  34 ++-
 .../bpf/prog_tests/xdp_adjust_frags.c         |  32 ++-
 .../bpf/prog_tests/xdp_adjust_tail.c          | 122 +++++----
 .../selftests/bpf/prog_tests/xdp_bpf2bpf.c    |  14 +-
 .../selftests/bpf/prog_tests/xdp_noinline.c   |  44 ++--
 .../selftests/bpf/prog_tests/xdp_perf.c       |  19 +-
 tools/testing/selftests/bpf/test_lru_map.c    |  11 +-
 tools/testing/selftests/bpf/test_verifier.c   |  16 +-
 53 files changed, 872 insertions(+), 807 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/prog_run_opts.c
 delete mode 100644 tools/testing/selftests/bpf/prog_tests/prog_run_xattr.c

--
2.30.2

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

end of thread, other threads:[~2022-02-03  7:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02 23:54 [PATCH bpf-next v3 0/4] migrate from bpf_prog_test_run{,_xattr} Delyan Kratunov
2022-02-02 23:54 ` [PATCH bpf-next v3 1/4] selftests/bpf: migrate from bpf_prog_test_run Delyan Kratunov
2022-02-02 23:54 ` [PATCH bpf-next v3 2/4] selftests/bpf: migrate from bpf_prog_test_run_xattr Delyan Kratunov
2022-02-02 23:54 ` [PATCH bpf-next v3 3/4] bpftool: " Delyan Kratunov
2022-02-02 23:54 ` [PATCH bpf-next v3 4/4] libbpf: Deprecate bpf_prog_test_run_xattr and bpf_prog_test_run Delyan Kratunov
2022-02-03  7:11 ` [PATCH bpf-next v3 0/4] migrate from bpf_prog_test_run{,_xattr} Andrii Nakryiko
2022-02-03  7:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.