From: sashiko-bot@kernel.org
To: "Hui Zhu" <hui.zhu@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/2] selftests/bpf: Add bpf_proactive_reclaim test
Date: Thu, 24 Sep 2026 04:14:17 +0000 [thread overview]
Message-ID: <20260924041418.486C61F000FF@smtp.kernel.org> (raw)
In-Reply-To: <67d8708eeaa771dea97d5c1f15744fe33178c43b.1790222105.git.zhuhui@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] bpf: selftest fails instead of skipping on tmpfs-only environments
--
commit 050e765c2f056e2f47574982f5ca0cece0afd7b8
Author: Hui Zhu <zhuhui@kylinos.cn>
selftests/bpf: Add bpf_proactive_reclaim test
This commit adds a selftest for the bpf_proactive_reclaim kfunc. It verifies
the bounded reclaim behavior by charging page cache to a cgroup and requesting
eviction of the allocated pages in a single call.
> diff --git a/tools/testing/selftests/bpf/prog_tests/memcg_proactive_reclaim.c b/tools/testing/selftests/bpf/prog_tests/memcg_proactive_reclaim.c
> new file mode 100644
> index 0000000000000..d642658a21981
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/memcg_proactive_reclaim.c
[ ... ]
> +void test_memcg_proactive_reclaim(void)
> +{
> + struct memcg_proactive_reclaim *skel = NULL;
> + struct reclaim_args args = {};
> +
> + LIBBPF_OPTS(bpf_test_run_opts, opts,
> + .ctx_in = &args,
> + .ctx_size_in = sizeof(args));
> +
> + char data_file[PATH_MAX];
> + static char buf[BUF_SIZE];
> + __u64 cgroup_id;
> + const char *dir;
> + off_t off;
> + int cg_fd = -1, data_fd = -1, err;
> +
> + dir = workload_dir();
> + if (!ASSERT_OK_PTR(dir, "workload dir on a regular filesystem"))
> + return;
[Severity: Medium]
Will this cause spurious test failures in tmpfs-only environments?
When workload_dir() cannot find a suitable regular filesystem (for instance,
when both '.' and '/tmp' are tmpfs/ramfs), it returns NULL.
Using ASSERT_OK_PTR() here unconditionally fails the test. Could this be
changed to gracefully skip the test instead via test__skip(), so that CI
environments lacking a disk-backed filesystem do not falsely report a failure?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1790222105.git.zhuhui@kylinos.cn?part=1
next prev parent reply other threads:[~2026-09-24 4:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 4:04 [PATCH bpf-next 0/2] selftests and sample for bpf_proactive_reclaim Hui Zhu
2026-09-24 4:04 ` [PATCH bpf-next 1/2] selftests/bpf: Add bpf_proactive_reclaim test Hui Zhu
2026-09-24 4:14 ` sashiko-bot [this message]
2026-09-24 4:04 ` [PATCH bpf-next 2/2] samples/bpf: Add memcg async reclaim example Hui Zhu
2026-09-24 5:02 ` bot+bpf-ci
2026-09-24 5:35 ` Alexei Starovoitov
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=20260924041418.486C61F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=hui.zhu@linux.dev \
--cc=sashiko-reviews@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.