Re: [PATCH bpf-next 5/5] selftests/bpf: add kfunc_call test for simple dtor in bpf_testmod

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

 



On Wed, 2024-06-19 at 18:42 +0100, Alan Maguire wrote:

[...]

> Sorry, I'm not following here. So I think what you'd like is a way to
> verify that the dtor actually runs, is that right? The problem there is
> that the map cleanup gets run when the skeleton gets destroyed, but then
> it's too late then to collect a count value via that BPF object.
> 
> The only thing I can think of is to create an additional tracing object
> that we separately load/attach to bpf_testmod_ctx_release() prior to
> running kfunc call tests to verify that the destructor fires on cleanup
> of the kfunc test skeletons. Is that what you have in mind? Thanks!

Tracing program could be an option, yes.
I was thinking about some map created by the driver program (the one
from prog_tests) that could be updated by destructor.
There is a question of how to pass the map FD to the kfunc,
probably it could be passed in a constructor for the kfunc and stored
in the context. But tracing program sounds good as well.

Again, it might be the case that checking that registration logic
works is sufficient. In such a case bodies of both kfunc and BPF
program could be empty.






[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