All of lore.kernel.org
 help / color / mirror / Atom feed
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: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24  4:00 [PATCH v7 0/8] selftests/cgroup: improve zswap tests robustness and support large page sizes Li Wang
2026-04-24  4:00 ` [PATCH v7 1/8] selftests/cgroup: skip test_zswap if zswap is globally disabled Li Wang
2026-04-24  4:00 ` [PATCH v7 2/8] selftests/cgroup: avoid OOM in test_swapin_nozswap Li Wang
2026-04-24  4:00 ` [PATCH v7 3/8] selftests/cgroup: use runtime page size for zswpin check Li Wang
2026-04-24  4:00 ` [PATCH v7 4/8] selftests/cgroup: rename PAGE_SIZE to BUF_SIZE in cgroup_util Li Wang
     [not found]   ` <20260424051557.8AA6AC19425@smtp.kernel.org>
2026-04-24  6:04     ` Li Wang [this message]
2026-04-24  4:00 ` [PATCH v7 5/8] selftests/cgroup: replace hardcoded page size values in test_zswap Li Wang
2026-04-24  5:20   ` Jiayuan Chen
2026-04-24  4:00 ` [PATCH v7 6/8] selftest/cgroup: fix zswap test_no_invasive_cgroup_shrink on large pagesize system Li Wang
2026-04-24  4:00 ` [PATCH v7 7/8] selftest/cgroup: fix zswap attempt_writeback() on 64K " Li Wang
2026-04-24  4:00 ` [PATCH v7 8/8] selftests/cgroup: test_zswap: wait for asynchronous writeback Li Wang
2026-04-24 10:06 ` [PATCH v7 0/8] selftests/cgroup: improve zswap tests robustness and support large page sizes Andrew Morton
2026-04-24 11:14   ` Li Wang
2026-04-24 13:31 ` Andrew Morton

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 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.