From: Li Wang <li.wang@linux.dev>
To: sashiko@lists.linux.dev
Cc: mkoutny@suse.com, tj@kernel.org, hannes@cmpxchg.org
Subject: Re: [PATCH v7 4/8] selftests/cgroup: rename PAGE_SIZE to BUF_SIZE in cgroup_util
Date: Fri, 24 Apr 2026 14:04:08 +0800 [thread overview]
Message-ID: <aesH2Epoi-HHSyH0@linux.dev> (raw)
In-Reply-To: <20260424051557.8AA6AC19425@smtp.kernel.org>
On Fri, Apr 24, 2026 at 05:15:56AM +0000, sashiko-bot@kernel.org wrote:
> Sashiko AI review found 1 potential issue(s):
> - [Low] The patch breaks the compilation of `test_zswap.c` by removing `PAGE_SIZE` without updating its usage.
> --
>
> commit f89f779468515400be3a3b17ce623322ceceeb45
> Author: Li Wang <li.wang@linux.dev>
>
> selftests/cgroup: rename PAGE_SIZE to BUF_SIZE in cgroup_util
>
> This commit renames the hardcoded PAGE_SIZE macro to BUF_SIZE to accurately
> reflect its purpose as an I/O buffer size. It also updates test_memcontrol
> to dynamically determine the system page size instead of relying on the
> hardcoded 4K value.
>
> > diff --git a/tools/testing/selftests/cgroup/lib/include/cgroup_util.h b/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
> > index 567b1082974c53..febc1723d09038 100644
> > --- a/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
> > +++ b/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
> > @@ -2,8 +2,8 @@
> > #include <stdbool.h>
> > #include <stdlib.h>
> >
> > -#ifndef PAGE_SIZE
> > -#define PAGE_SIZE 4096
> > +#ifndef BUF_SIZE
> > +#define BUF_SIZE 4096
>
> Does renaming this macro cause test_zswap.c to fail to compile with an
> undeclared identifier error?
>
> It appears test_zswap.c still relies on PAGE_SIZE being defined by this
> header for loops iterating over memory, such as:
>
> for (size_t i = 0; i < size; i += PAGE_SIZE)
This newline was introduced by a new commit:
4e89004ee ("selftests/cgroup: add test for zswap incompressible pages")
After rebase, I have resolved it in patch 5/8.
--
Regards,
Li Wang
parent reply other threads:[~2026-04-24 6:04 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260424051557.8AA6AC19425@smtp.kernel.org>]
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=aesH2Epoi-HHSyH0@linux.dev \
--to=li.wang@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=mkoutny@suse.com \
--cc=sashiko@lists.linux.dev \
--cc=tj@kernel.org \
/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