Re: [PATCH bpf-next v2 2/6] selftests/bpf: Skip ENOTSUPP in ASSERT_OK

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

 



On Mon, 2024-07-08 at 11:54 -0700, Andrii Nakryiko wrote:
> On Thu, Jul 4, 2024 at 7:38 PM Geliang Tang <geliang@xxxxxxxxxx> wrote:
> > 
> > From: Geliang Tang <tanggeliang@xxxxxxxxxx>
> > 
> > Just like handling ENOTSUPP in test_lsm_cgroup_functional(), this patch
> > adds a new helper test_progs_get_error() to check whether the input error
> > is ENOTSUPP (524) or ENOTSUP (95). If it is, invoke test__skip() to skip
> > the test instead of using test__fail().
> > 
> > Use this helper in ASSERT_OK() before invoking CHECK() macro.
> > 
> > Signed-off-by: Geliang Tang <tanggeliang@xxxxxxxxxx>
> > ---
> >  .../selftests/bpf/prog_tests/lsm_cgroup.c     |  6 +----
> >  tools/testing/selftests/bpf/test_progs.h      | 23 +++++++++++++++++--
> >  2 files changed, 22 insertions(+), 7 deletions(-)
> > 
> 
> I haven't followed these patch sets, but no, let's not add magical
> special error codes handling into ASSERT_xxx() macros.

I agree with Andrii here.
You might use -d (denylist) option for test_progs to filter out test
cases you know are not supported.

[...]





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux