mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurt Lin <lylin1023@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
	 Shuah Khan <shuah@kernel.org>,
	Mina Almasry <almasrymina@google.com>,
	 Sayali Patil <sayalip@linux.ibm.com>, Zi Yan <ziy@nvidia.com>,
	 Song Hu <husong@kylinos.cn>,
	linux-mm@kvack.org,  linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,  Li Wang <li.wang@linux.dev>,
	Kurt Lin <lylin1023@gmail.com>
Subject: [PATCH 3/4] selftests/mm: restore hidden hugetlb reservation scenarios
Date: Sat, 05 Dec 2026 01:31:59 +0800	[thread overview]
Message-ID: <20261205-hugetlb-charge-multi-cgroup-v1-3-e88105afc12a@gmail.com> (raw)
In-Reply-To: <20261205-hugetlb-charge-multi-cgroup-v1-0-e88105afc12a@gmail.com>

From: Song Hu <husong@kylinos.cn>

A stray 'continue' in the main loop of charge_reserved_hugetlb.sh made
the "more than reservation", "more than cgroup limit", and "multiple
cgroups" scenarios unreachable, so they never ran.

Remove it so the first two run again. The third,
run_multiple_cgroup_test(), is separately broken -- a backslash
line-continuation breaks its local declarations and its hugetlb
reservation accounting does not charge as expected -- and has never run
in CI; skip it explicitly with a comment until fixed. Also correct two
`[[ "$method" == 2"" ]]` typos (harmless empty-string concatenation)
to plain `2`.

Signed-off-by: Song Hu <husong@kylinos.cn>
Signed-off-by: Kurt Lin <lylin1023@gmail.com>
---
 tools/testing/selftests/mm/charge_reserved_hugetlb.sh | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
index 92d6a66e6a84..e43b7bc1ad1b 100755
--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
+++ b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -450,11 +450,11 @@ for populate in "" "-o"; do
         fi
 
         # Skip populated shmem tests. Doesn't seem to be supported.
-        if [[ "$method" == 2"" ]] && [[ "$populate" == "-o" ]]; then
+        if [[ "$method" == 2 ]] && [[ "$populate" == "-o" ]]; then
           continue
         fi
 
-        if [[ "$method" == 2"" ]] && [[ "$reserve" == "-n" ]]; then
+        if [[ "$method" == 2 ]] && [[ "$reserve" == "-n" ]]; then
           continue
         fi
 
@@ -507,7 +507,6 @@ for populate in "" "-o"; do
         echo 'PASS'
 
         cleanup
-        continue
         echo
         echo
         echo
@@ -525,6 +524,15 @@ for populate in "" "-o"; do
 
         cleanup
 
+        # The "multiple cgroups" scenario (run_multiple_cgroup_test) is
+        # multiply broken and has never run in CI: a backslash
+        # line-continuation breaks its local declarations, it passes
+        # reservation sizes in bytes rather than pages (unlike
+        # run_test), and its assertions compare page counts to byte
+        # values. Skip it until properly rewritten; the two scenarios
+        # above are restored by this change.
+        continue
+
         echo
         echo
         echo

-- 
2.56.1


  parent reply	other threads:[~2026-12-04 17:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 17:31 [PATCH 0/4] selftests/mm: run all hugetlb cgroup reservation tests Kurt Lin
2026-12-04 17:31 ` [PATCH 1/4] selftests/mm: don't wait for a hugetlb reservation that is expected to fail Kurt Lin
2026-12-04 17:31 ` [PATCH 2/4] selftests/mm: don't use killall --wait in charge_reserved_hugetlb.sh Kurt Lin
2026-12-04 17:31 ` Kurt Lin [this message]
2026-12-04 17:32 ` [PATCH 4/4] selftests/mm: fix and enable the multiple cgroups hugetlb tests Kurt Lin
2026-12-05  8:33 ` [PATCH 0/4] selftests/mm: run all hugetlb cgroup reservation tests 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=20261205-hugetlb-charge-multi-cgroup-v1-3-e88105afc12a@gmail.com \
    --to=lylin1023@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=david@kernel.org \
    --cc=husong@kylinos.cn \
    --cc=li.wang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=sayalip@linux.ibm.com \
    --cc=shuah@kernel.org \
    --cc=vbabka@kernel.org \
    --cc=ziy@nvidia.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

all inboxes | Powered by JetHome®