Re: [PATCH bpf-next v11 11/11] selftests/bpf: lsm_cgroup functional test

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

 



On Wed, Jun 29, 2022 at 1:31 PM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote:
>
> On Wed, Jun 29, 2022 at 1:26 PM Alexei Starovoitov
> <alexei.starovoitov@xxxxxxxxx> wrote:
> >
> > On Tue, Jun 28, 2022 at 10:43 AM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote:
> > > +
> > > +static void test_lsm_cgroup_functional(void)
> >
> > It fails BPF CI on s390:
> >
> > test_lsm_cgroup_functional:FAIL:attach alloc_prog_fd unexpected error:
> > -524 (errno 524)
> > test_lsm_cgroup_functional:FAIL:detach_create unexpected
> > detach_create: actual -2 < expected 0
> > test_lsm_cgroup_functional:FAIL:detach_alloc unexpected detach_alloc:
> > actual -2 < expected 0
> > test_lsm_cgroup_functional:FAIL:detach_clone unexpected detach_clone:
> > actual -2 < expected 0
> >
> > https://github.com/kernel-patches/bpf/runs/7100626120?check_suite_focus=true
> >
> > but I pushed it to bpf-next anyway.
> > Thanks a lot for this work and please follow up with a fix.
>
> Thanks, I'll take a look!

Looks like this needs a blacklist entry in
https://github.com/kernel-patches/vmtest/blob/master/travis-ci/vmtest/configs/blacklist/BLACKLIST-latest.s390x

Or, I can make tests more flexible by doing the following
(copy-pasting into gmail, so tabs are broken):

diff --git a/tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
b/tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
index d40810a742fa..904b02a17598 100644
--- a/tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
+++ b/tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
@@ -100,6 +100,10 @@ static void test_lsm_cgroup_functional(void)
  ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_sk_alloc_security"), 0,
"prog count");
  ASSERT_EQ(query_prog_cnt(cgroup_fd, NULL), 0, "total prog count");
  err = bpf_prog_attach(alloc_prog_fd, cgroup_fd, BPF_LSM_CGROUP, 0);
+ if (err < 0 && errno == ENOTSUPP) {
+ test__skip();
+ return;
+ }
  if (!ASSERT_OK(err, "attach alloc_prog_fd"))
  goto detach_cgroup;
  ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_sk_alloc_security"), 1,
"prog count");

Any preference?



[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