Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Viktor Malik <vmalik@redhat.com>
To: sun jian <sun.jian.kdev@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Shuah Khan <shuah@kernel.org>,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH 2/2] selftests/bpf: Skip bpffs debug iter checks when unavailable in test_bpffs
Date: Wed, 11 Mar 2026 11:31:47 +0100	[thread overview]
Message-ID: <25faef0f-7943-4c0b-97e4-4a3a45895e25@redhat.com> (raw)
In-Reply-To: <CABFUUZFQfoVRJ6HJqadHhWNj4FVOk=snuSmuEepMD6jZfyrpJQ@mail.gmail.com>

On 3/11/26 08:55, sun jian wrote:
> On Tue, Mar 10, 2026 at 8:32 PM Viktor Malik <vmalik@redhat.com> wrote:
>>
>> I don't think this is a good approach as it will mask genuine bugs that
>> would cause the files to be missing/inaccessible with one of the above
>> error codes.
>>
> Hi Viktor,
> 
> I don't think this change masks bugs in a silent way. It prints an explicit
> INFO line when maps.debug/progs.debug are unavailable due to
> EPERM/EACCES/ENOENT, and it still fails on other errors or unexpected
> iterator output.

Yeah but automatic CI doesn't care about INFO lines. It cares about
pass/fail status and in this case, the test could falsely appear as
passing, even though there's a bug in bpffs code causing the files not
to exist or have wrong permissions.

>> If you really need to execute the rest of the test cases in the file,
>> how about you split the test into subtests and then just add the failing
>> subtest to your DENYLIST?
> 
> Proper subtests  would require reworking the current fork-based flow to
> report SKIP/FAIL to the harness, which would be a larger refactor than
> intended here.

I don't think it would be such a big refactoring. You can still use
fork(), you just need to have separate `run` functions for different
subtests. True, the init/teardown phase would be somewhat duplicated but
I wouldn't see that as a big issue (and you can still factor it out).

> My goal is to keep this as a minimal change while still achieving the main
> purpose of this test: exercising the core bpffs operations (pinning and
> renameat2 semantics), which are independent of the debug iterator files,
> and clearly reporting when the iterator checks couldn't be performed.

That's exactly what subtests are for, at least in my view. You want to
check independent operations, you create a separate subtest for each.
That way, you can filter out some subtests if they don't pass in your
environment.


  reply	other threads:[~2026-03-11 10:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 10:21 [PATCH 1/2] selftests/bpf: Fix read_iter buffer termination in test_bpffs Sun Jian
2026-03-10 10:21 ` [PATCH 2/2] selftests/bpf: Skip bpffs debug iter checks when unavailable " Sun Jian
2026-03-10 12:32   ` Viktor Malik
2026-03-11  7:55     ` sun jian
2026-03-11 10:31       ` Viktor Malik [this message]
2026-03-12 21:44   ` Yonghong Song
2026-03-13  2:49     ` sun jian
2026-03-10 12:28 ` [PATCH 1/2] selftests/bpf: Fix read_iter buffer termination " Viktor Malik
2026-03-11  6:47   ` sun jian
2026-03-11 10:38     ` Viktor Malik
2026-03-12 21:41 ` Yonghong Song

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=25faef0f-7943-4c0b-97e4-4a3a45895e25@redhat.com \
    --to=vmalik@redhat.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=sun.jian.kdev@gmail.com \
    /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