Re: [PATCH v2 bpf-next 9/9] selftests/bpf: add arg:ctx cases to test_global_funcs tests

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

 



On Wed, 2024-01-03 at 15:17 -0800, Andrii Nakryiko wrote:
[...]
> > However, the transformation of the sub-program parameters happens
> > unconditionally. So it should be possible to read BTF for some of the
> > programs after they are loaded and check if transformation is applied
> > as expected. Thus allowing to check __arg_ctx handling on libbpf side
> > w/o the need to run on old kernel.
> 
> Yes, but it's bpf_prog_info to get func_info (actually two calls due
> to how API is), parse func_info (pain without libbpf internal helpers
> from libbpf_internal.h, and with it's more coupling) to find subprog's
> func BTF ID and then check BTF.
> 
> It's so painful that I don't think it's worth it given we'll test this
> in libbpf CI (and I did manual check locally as well).
> 
> Also, nothing actually prevents us from not doing this if the kernel
> supports __arg_ctx natively, which is just a painful feature detector
> to write, using low-level APIs, which is why I decided that it's
> simpler to just do this unconditionally.

I agree that there is no need for feature detection in this case.

> > I think it's worth it to add such test, wdyt?
> > 
> 
> I feel like slacking and not adding this :) This will definitely fail
> in libbpf CI, if it's wrong.

Very few people look at libbpf CI results and those results would be
available only after sync.

Idk, I think that some form of testing is necessary for kernel CI.
Either this, or an additional job that executes selected set of tests
on old kernel.





[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