From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Geliang Tang <geliang@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>,
Mykola Lysenko <mykolal@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Shuah Khan <shuah@kernel.org>,
Geliang Tang <tanggeliang@kylinos.cn>,
bpf@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 2/6] selftests/bpf: Skip ENOTSUPP in ASSERT_OK
Date: Mon, 08 Jul 2024 12:47:41 -0700 [thread overview]
Message-ID: <57342e8b8ca1c82d57d78335a73d465f16a41811.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzZ=df1LZrNh90UXURm0DOm1D12MkWKF+D6uTsiQG4rsDg@mail.gmail.com>
On Mon, 2024-07-08 at 11:54 -0700, Andrii Nakryiko wrote:
> On Thu, Jul 4, 2024 at 7:38 PM Geliang Tang <geliang@kernel.org> wrote:
> >
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > 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@kylinos.cn>
> > ---
> > .../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.
[...]
next prev parent reply other threads:[~2024-07-08 19:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 2:38 [PATCH bpf-next v2 0/6] skip ENOTSUPP BPF selftests Geliang Tang
2024-07-05 2:38 ` [PATCH bpf-next v2 1/6] selftests/bpf: Define ENOTSUPP in testing_helpers.h Geliang Tang
2024-07-05 2:38 ` [PATCH bpf-next v2 2/6] selftests/bpf: Skip ENOTSUPP in ASSERT_OK Geliang Tang
2024-07-08 18:54 ` Andrii Nakryiko
2024-07-08 19:47 ` Eduard Zingerman [this message]
2024-07-05 2:38 ` [PATCH bpf-next v2 3/6] selftests/bpf: Use ASSERT_OK to skip ENOTSUPP Geliang Tang
2024-07-05 2:38 ` [PATCH bpf-next v2 4/6] selftests/bpf: Null checks for link in bpf_tcp_ca Geliang Tang
2024-07-08 19:42 ` Eduard Zingerman
2024-07-10 2:58 ` Geliang Tang
2024-07-05 2:38 ` [PATCH bpf-next v2 5/6] selftests/bpf: Skip ENOTSUPP in ASSERT_OK_PTR Geliang Tang
2024-07-05 2:38 ` [PATCH bpf-next v2 6/6] selftests/bpf: Skip ENOTSUPP in ASSERT_GE Geliang Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57342e8b8ca1c82d57d78335a73d465f16a41811.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=geliang@kernel.org \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=sdf@google.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=tanggeliang@kylinos.cn \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox