Re: [PATCH] selftests/bpf: Add ring_buffer__consume_n test.

From: Andrea Righi
Date: Thu Apr 25 2024 - 10:01:58 EST


On Thu, Apr 25, 2024 at 02:23:30PM +0200, Jiri Olsa wrote:
> On Thu, Apr 25, 2024 at 08:19:04AM +0200, Andrea Righi wrote:
> > On Sun, Apr 21, 2024 at 10:11:33PM +0200, Jiri Olsa wrote:
> > ...
> > > > static struct test_ringbuf_map_key_lskel *skel_map_key;
> > > > +static struct test_ringbuf_n_lskel *skel_n;
> > >
> > > seems like there's no need for this to be static variable
> >
> > Can you elaborate more? I think we want these pointers to be static to
> > limit the scope to this file, no?
>
> I meant to move it directly inside ringbuf_n_subtest function,
> I don't see reason why it's defined outside of that function

Oh I see! Yeah, that makes sense, I'll send a v3 soon.

Thanks,
-Andrea