Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios
@ 2026-07-14  2:16 Song Hu
  2026-09-02  0:37 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Song Hu @ 2026-07-14  2:16 UTC (permalink / raw)
  To: linux-mm
  Cc: akpm, muchun.song, osalvador, david, ljs, liam, vbabka, rppt,
	surenb, mhocko, shuah, linux-kselftest, linux-kernel, Song Hu

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>
---
 .../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 a1cfd3a349db..18b2f2060c61 100755
--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
+++ b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -439,11 +439,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
 
@@ -496,7 +496,6 @@ for populate in "" "-o"; do
         echo 'PASS'
 
         cleanup
-        continue
         echo
         echo
         echo
@@ -530,6 +529,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.43.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios
  2026-07-14  2:16 [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios Song Hu
@ 2026-09-02  0:37 ` Andrew Morton
  2026-09-04  8:30   ` Mike Rapoport
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-09-02  0:37 UTC (permalink / raw)
  To: Song Hu
  Cc: linux-mm, muchun.song, osalvador, david, ljs, liam, vbabka, rppt,
	surenb, mhocko, shuah, linux-kselftest, linux-kernel,
	Mina Almasry

On Tue, 14 Jul 2026 10:16:30 +0800 Song Hu <husong@kylinos.cn> wrote:

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

OK.

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

That's reasonable.  This code was added by Mina six years ago.  But
he's still around so let's bug him with a cc ;)

> Also correct two
> `[[ "$method" == 2"" ]]` typos (harmless empty-string concatenation)
> to plain `2`.

OK.



From: Song Hu <husong@kylinos.cn>
Subject: selftests/mm: restore hidden hugetlb reservation scenarios
Date: Tue, 14 Jul 2026 10:16:30 +0800

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

Link: https://lore.kernel.org/20260714021630.1063823-1-husong@kylinos.cn
Signed-off-by: Song Hu <husong@kylinos.cn>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mina Almasry <almasrymina@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/charge_reserved_hugetlb.sh |   14 +++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh~selftests-mm-restore-hidden-hugetlb-reservation-scenarios
+++ a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -439,11 +439,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
 
@@ -496,7 +496,6 @@ for populate in "" "-o"; do
         echo 'PASS'
 
         cleanup
-        continue
         echo
         echo
         echo
@@ -530,6 +529,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
_



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios
  2026-09-02  0:37 ` Andrew Morton
@ 2026-09-04  8:30   ` Mike Rapoport
  2026-09-04 17:48     ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2026-09-04  8:30 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Song Hu, linux-mm, muchun.song, osalvador, david, ljs, liam,
	vbabka, surenb, mhocko, shuah, linux-kselftest, linux-kernel,
	Mina Almasry

On Tue, Sep 01, 2026 at 05:37:48PM -0700, Andrew Morton wrote:
> On Tue, 14 Jul 2026 10:16:30 +0800 Song Hu <husong@kylinos.cn> wrote:
> 
> > 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.
> 
> OK.
> 
> > 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.
> 
> That's reasonable.  This code was added by Mina six years ago.  But
> he's still around so let's bug him with a cc ;)

And this code breaks our CI e.g:

https://github.com/linux-mm/linux-mm/actions/runs/33040981840/job/98414290236

> > Also correct two
> > `[[ "$method" == 2"" ]]` typos (harmless empty-string concatenation)
> > to plain `2`.
> 
> OK.
> 
> 
> 
> From: Song Hu <husong@kylinos.cn>
> Subject: selftests/mm: restore hidden hugetlb reservation scenarios
> Date: Tue, 14 Jul 2026 10:16:30 +0800
> 
> 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`.
> 
> Link: https://lore.kernel.org/20260714021630.1063823-1-husong@kylinos.cn
> Signed-off-by: Song Hu <husong@kylinos.cn>
> Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Hildenbrand <david@kernel.org>
> Cc: Liam R. Howlett <liam@infradead.org>
> Cc: Lorenzo Stoakes <ljs@kernel.org>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Muchun Song <muchun.song@linux.dev>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: Vlastimil Babka <vbabka@kernel.org>
> Cc: Mina Almasry <almasrymina@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  tools/testing/selftests/mm/charge_reserved_hugetlb.sh |   14 +++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> --- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh~selftests-mm-restore-hidden-hugetlb-reservation-scenarios
> +++ a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
> @@ -439,11 +439,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
>  
> @@ -496,7 +496,6 @@ for populate in "" "-o"; do
>          echo 'PASS'
>  
>          cleanup
> -        continue
>          echo
>          echo
>          echo
> @@ -530,6 +529,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
> _
> 
> 

-- 
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios
  2026-09-04  8:30   ` Mike Rapoport
@ 2026-09-04 17:48     ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2026-09-04 17:48 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Song Hu, linux-mm, muchun.song, osalvador, david, ljs, liam,
	vbabka, surenb, mhocko, shuah, linux-kselftest, linux-kernel,
	Mina Almasry

On Fri, 4 Sep 2026 11:30:23 +0300 Mike Rapoport <rppt@kernel.org> wrote:

> On Tue, Sep 01, 2026 at 05:37:48PM -0700, Andrew Morton wrote:
> > On Tue, 14 Jul 2026 10:16:30 +0800 Song Hu <husong@kylinos.cn> wrote:
> > 
> > > 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.
> > 
> > OK.
> > 
> > > 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.
> > 
> > That's reasonable.  This code was added by Mina six years ago.  But
> > he's still around so let's bug him with a cc ;)
> 
> And this code breaks our CI e.g:
> 
> https://github.com/linux-mm/linux-mm/actions/runs/33040981840/job/98414290236

What do we need to do to view the error output there?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-04 17:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14  2:16 [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios Song Hu
2026-09-02  0:37 ` Andrew Morton
2026-09-04  8:30   ` Mike Rapoport
2026-09-04 17:48     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox