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 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