BPF List
 help / color / mirror / Atom feed
From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>,
	bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, kernel-team@meta.com, eddyz87@gmail.com,
	memxor@gmail.com
Cc: Mykyta Yatsenko <yatsenko@meta.com>,
	Shung-Hsi Yu <shung-hsi.yu@suse.com>
Subject: Re: [PATCH] selftests/bpf: Fix flaky file_reader test
Date: Fri, 5 Jun 2026 12:35:58 -0700	[thread overview]
Message-ID: <7fc583a4-b664-4578-9068-7cb9d9be19bb@linux.dev> (raw)
In-Reply-To: <20260603-file_reader_flake-v1-1-7f3f52d1e388@meta.com>

On 6/3/26 7:39 AM, Mykyta Yatsenko wrote:
> From: Mykyta Yatsenko <yatsenko@meta.com>
> 
> file_reader/on_open_expect_fault test expects page fault
> when reading pages from the test harness executable.
> It is not guaranteed that those are paged out, even
> after madvise(MADV_PAGEOUT).
> Relax the condition in the test to succeed with both
> 0 and -EFAULT returned.
> 
> Fixes: 784cdf931543 ("selftests/bpf: add file dynptr tests")
> Reported-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
> Closes: https://lore.kernel.org/all/ah6g7JSYOWGp2oAG@u94a/
> Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>

Hi Mykyta,

I tried the patch on libbpf/libbpf CI, the test was consistently
failing there. It works [1], thanks!

Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>

[1] https://github.com/libbpf/libbpf/actions/runs/27032965962

> ---
>  tools/testing/selftests/bpf/progs/file_reader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/bpf/progs/file_reader.c b/tools/testing/selftests/bpf/progs/file_reader.c
> index 462712ff3b8a..aa2c05cce2b3 100644
> --- a/tools/testing/selftests/bpf/progs/file_reader.c
> +++ b/tools/testing/selftests/bpf/progs/file_reader.c
> @@ -50,7 +50,7 @@ int on_open_expect_fault(void *c)
>  		goto out;
>  
>  	local_err = bpf_dynptr_read(tmp_buf, user_buf_sz, &dynptr, user_buf_sz, 0);
> -	if (local_err == -EFAULT) { /* Expect page fault */
> +	if (local_err == -EFAULT || local_err == 0) { /* Expect page fault or success */
>  		local_err = 0;
>  		run_success = 1;
>  	}
> 
> ---
> base-commit: 245da8192c073820390f7fa1cc1e834b32119bce
> change-id: 20260603-file_reader_flake-bf0753be6b2e
> 
> Best regards,
> --  
> Mykyta Yatsenko <yatsenko@meta.com>
> 


  parent reply	other threads:[~2026-06-05 19:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 14:39 [PATCH] selftests/bpf: Fix flaky file_reader test Mykyta Yatsenko
2026-06-03 14:53 ` Mykyta Yatsenko
2026-06-05 19:35 ` Ihor Solodrai [this message]
2026-06-05 21:20 ` patchwork-bot+netdevbpf

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=7fc583a4-b664-4578-9068-7cb9d9be19bb@linux.dev \
    --to=ihor.solodrai@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=memxor@gmail.com \
    --cc=mykyta.yatsenko5@gmail.com \
    --cc=shung-hsi.yu@suse.com \
    --cc=yatsenko@meta.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