Re: [PATCH bpf-next 2/2] bpf: Add a selftest for the tracing bpf_get_socket_cookie

From: Florent Revest
Date: Fri Nov 27 2020 - 04:17:37 EST


On Thu, 2020-11-26 at 23:56 -0800, Yonghong Song wrote:
>
> On 11/26/20 9:02 AM, Florent Revest wrote:
> > This builds up on the existing socket cookie test which checks
> > whether
> > the bpf_get_socket_cookie helpers provide the same value in
> > cgroup/connect6 and sockops programs for a socket created by the
> > userspace part of the test.
> >
> > Adding a tracing program to the existing objects requires a
> > different
> > attachment strategy and different headers.
> >
> > Signed-off-by: Florent Revest <revest@xxxxxxxxxx>
> > ---
> > .../selftests/bpf/progs/socket_cookie_prog.c | 41
> > ++++++++++++++++---
> > .../selftests/bpf/test_socket_cookie.c | 18 +++++---
>
> Do you think it is possible to migrate test_socket_cookie.c to
> selftests/bpf/prog_tests so it can be part of test_progs so
> it will be regularly exercised?

I suppose it's possible, I can give it a try :)