Re: [PATCH bpf-next v2 0/4] migrate from bpf_prog_test_run{,_xattr}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/28/22 2:23 AM, Delyan Kratunov wrote:
Fairly straight-forward mechanical transformation from bpf_prog_test_run
and bpf_prog_test_run_xattr to the bpf_prog_test_run_opts goodness.
Most of the changes are in tests, though bpftool and libbpf (xsk.c) have one
call site each as well.

The only aspect that's still a bit RFC is that prog_run_xattr is testing
behavior specific to bpf_prog_test_run_xattr, which does not exist in prog_run_opts.
Namely, -EINVAL return on data_out == NULL && data_size_out > 0.
Adding this behavior to prog_test_run_opts is one option, keeping the test as-is
and cloning it to use bpf_prog_test_run_opts is another possibility.

I would suggest to do the former rather than duplicating, if there's nothing
particularly blocking us from adding this to prog_test_run_opts.

The current version just suppresses the deprecation warning.

As an aside, checkpatch really doesn't like that LIBBPF_OPTS looks like
a function call but is formatted like a struct declaration. If anyone
cares about formatting, now would be a good time to mention it.

As you have it looks good to me. One small nit, please also add a non-empty
commit message with rationale to each of the patches rather than just SoB alone.

Thanks a lot!

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux