Re: [PATCH v3 bpf-next 13/13] selftest/bpf: Revert CO-RE removal in test_ksyms_weak.

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

 



On Mon, Nov 22, 2021 at 4:23 PM Kumar Kartikeya Dwivedi
<memxor@xxxxxxxxx> wrote:
>
> On Sat, Nov 20, 2021 at 09:02:55AM IST, Alexei Starovoitov wrote:
> > From: Alexei Starovoitov <ast@xxxxxxxxxx>
> >
> > The commit 087cba799ced ("selftests/bpf: Add weak/typeless ksym test for light skeleton")
> > added test_ksyms_weak to light skeleton testing, but remove CO-RE access.
> > Revert that part of commit, since light skeleton can use CO-RE in the kernel.
> >
> > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
> > ---
> >  tools/testing/selftests/bpf/prog_tests/ksyms_btf.c  | 4 ++--
> >  tools/testing/selftests/bpf/progs/test_ksyms_weak.c | 2 +-
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/prog_tests/ksyms_btf.c b/tools/testing/selftests/bpf/prog_tests/ksyms_btf.c
> > index 79f6bd1e50d6..988f5db3e342 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/ksyms_btf.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/ksyms_btf.c
> > @@ -101,7 +101,7 @@ static void test_weak_syms(void)
> >       usleep(1);
> >
> >       data = skel->data;
> > -     ASSERT_EQ(data->out__existing_typed, 0, "existing typed ksym");
> > +     ASSERT_GE(data->out__existing_typed, 0, "existing typed ksym");
>
> I think original test (2211c825e7b6b) was doing ASSERT_EQ, since per cpu ptr for
> runqueue is from CPU 0.

Thanks for the explanation.
I saw that the value is zero, but didn't dig that far to see that
it's fixed due to runqueue design.



[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