public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
* [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation
@ 2026-04-27 16:03 Luiz Capitulino
  2026-04-27 16:12 ` Andrew Morton
  2026-04-28  0:17 ` SeongJae Park
  0 siblings, 2 replies; 6+ messages in thread
From: Luiz Capitulino @ 2026-04-27 16:03 UTC (permalink / raw)
  To: Linux Memory Management List, Andrew Morton, Mike Rapoport
  Cc: David Hildenbrand (Red Hat), Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Suren Baghdasaryan, Michal Hocko, Shuah Khan,
	linux-kselftest, LKML

Destructive tests should be invocated with -d command-line option, but
this won't work today since 'd' is missing in getopts command-line. This
commit fixes it.

Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
---
Mike,

Maybe it's a good idea to add this patch to your series since the
hugetlb-read-hwpoison selftest won't work without your fix.

  tools/testing/selftests/mm/run_vmtests.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index d8468451b3a3..c17b133a81d2 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -103,7 +103,7 @@ RUN_ALL=false
  RUN_DESTRUCTIVE=false
  TAP_PREFIX="# "
  
-while getopts "aht:n" OPT; do
+while getopts "aht:nd" OPT; do
  	case ${OPT} in
  		"a") RUN_ALL=true ;;
  		"h") usage ;;
-- 
2.53.0



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

* Re: [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation
  2026-04-27 16:03 [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation Luiz Capitulino
@ 2026-04-27 16:12 ` Andrew Morton
  2026-04-27 16:49   ` Mike Rapoport
  2026-04-28  0:17 ` SeongJae Park
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2026-04-27 16:12 UTC (permalink / raw)
  To: Luiz Capitulino
  Cc: Linux Memory Management List, Mike Rapoport,
	David Hildenbrand (Red Hat), Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Suren Baghdasaryan, Michal Hocko, Shuah Khan,
	linux-kselftest, LKML, Muhammad Usama Anjum

On Mon, 27 Apr 2026 12:03:51 -0400 Luiz Capitulino <luizcap@redhat.com> wrote:

> Destructive tests should be invocated with -d command-line option, but
> this won't work today since 'd' is missing in getopts command-line. This
> commit fixes it.
> 
> Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
> ---
> Mike,
> 
> Maybe it's a good idea to add this patch to your series since the
> hugetlb-read-hwpoison selftest won't work without your fix.

Or I can scoot it into mainline as a hotfix and Mike will pick it up
via Linus, soon?

It'd be good to have a Fixes:.  It looks like a3c5cc5129ef5 or
2bc4813622459?

>   tools/testing/selftests/mm/run_vmtests.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> index d8468451b3a3..c17b133a81d2 100755
> --- a/tools/testing/selftests/mm/run_vmtests.sh
> +++ b/tools/testing/selftests/mm/run_vmtests.sh
> @@ -103,7 +103,7 @@ RUN_ALL=false
>   RUN_DESTRUCTIVE=false
>   TAP_PREFIX="# "
>   
> -while getopts "aht:n" OPT; do
> +while getopts "aht:nd" OPT; do
>   	case ${OPT} in
>   		"a") RUN_ALL=true ;;
>   		"h") usage ;;
> -- 
> 2.53.0


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

* Re: [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation
  2026-04-27 16:12 ` Andrew Morton
@ 2026-04-27 16:49   ` Mike Rapoport
  2026-04-27 16:55     ` Luiz Capitulino
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Rapoport @ 2026-04-27 16:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Luiz Capitulino, Linux Memory Management List,
	David Hildenbrand (Red Hat), Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Suren Baghdasaryan, Michal Hocko, Shuah Khan,
	linux-kselftest, LKML, Muhammad Usama Anjum

On Mon, Apr 27, 2026 at 09:12:50AM -0700, Andrew Morton wrote:
> On Mon, 27 Apr 2026 12:03:51 -0400 Luiz Capitulino <luizcap@redhat.com> wrote:
> 
> > Destructive tests should be invocated with -d command-line option, but
> > this won't work today since 'd' is missing in getopts command-line. This
> > commit fixes it.
> > 
> > Signed-off-by: Luiz Capitulino <luizcap@redhat.com>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> > ---
> > Mike,
> > 
> > Maybe it's a good idea to add this patch to your series since the
> > hugetlb-read-hwpoison selftest won't work without your fix.
> 
> Or I can scoot it into mainline as a hotfix and Mike will pick it up
> via Linus, soon?

I'm fine with this.
 
> It'd be good to have a Fixes:.  It looks like a3c5cc5129ef5 or
> 2bc4813622459?

It's rather f16ff3b692ad ;-)
It added RUN_DESTRUCTIVE and a case for 'd' option, but missed it in
getops.

> >   tools/testing/selftests/mm/run_vmtests.sh | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> > index d8468451b3a3..c17b133a81d2 100755
> > --- a/tools/testing/selftests/mm/run_vmtests.sh
> > +++ b/tools/testing/selftests/mm/run_vmtests.sh
> > @@ -103,7 +103,7 @@ RUN_ALL=false
> >   RUN_DESTRUCTIVE=false
> >   TAP_PREFIX="# "
> >   
> > -while getopts "aht:n" OPT; do
> > +while getopts "aht:nd" OPT; do
> >   	case ${OPT} in
> >   		"a") RUN_ALL=true ;;
> >   		"h") usage ;;
> > -- 
> > 2.53.0

-- 
Sincerely yours,
Mike.


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

* Re: [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation
  2026-04-27 16:49   ` Mike Rapoport
@ 2026-04-27 16:55     ` Luiz Capitulino
  2026-04-27 16:58       ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Luiz Capitulino @ 2026-04-27 16:55 UTC (permalink / raw)
  To: Mike Rapoport, Andrew Morton
  Cc: Linux Memory Management List, David Hildenbrand (Red Hat),
	Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka,
	Suren Baghdasaryan, Michal Hocko, Shuah Khan, linux-kselftest,
	LKML, Muhammad Usama Anjum

On 2026-04-27 12:49, Mike Rapoport wrote:
> On Mon, Apr 27, 2026 at 09:12:50AM -0700, Andrew Morton wrote:
>> On Mon, 27 Apr 2026 12:03:51 -0400 Luiz Capitulino <luizcap@redhat.com> wrote:
>>
>>> Destructive tests should be invocated with -d command-line option, but
>>> this won't work today since 'd' is missing in getopts command-line. This
>>> commit fixes it.
>>>
>>> Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
> 
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> 
>>> ---
>>> Mike,
>>>
>>> Maybe it's a good idea to add this patch to your series since the
>>> hugetlb-read-hwpoison selftest won't work without your fix.
>>
>> Or I can scoot it into mainline as a hotfix and Mike will pick it up
>> via Linus, soon?
> 
> I'm fine with this.

Then it works for me too.

>   
>> It'd be good to have a Fixes:.  It looks like a3c5cc5129ef5 or
>> 2bc4813622459?
> 
> It's rather f16ff3b692ad ;-)
> It added RUN_DESTRUCTIVE and a case for 'd' option, but missed it in
> getops.

Exactly, I just found out the same thing and came here to report it but
you beat me to it :)

Andrew, do you need a v2 or can you edit the patch description for me?

> 
>>>    tools/testing/selftests/mm/run_vmtests.sh | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
>>> index d8468451b3a3..c17b133a81d2 100755
>>> --- a/tools/testing/selftests/mm/run_vmtests.sh
>>> +++ b/tools/testing/selftests/mm/run_vmtests.sh
>>> @@ -103,7 +103,7 @@ RUN_ALL=false
>>>    RUN_DESTRUCTIVE=false
>>>    TAP_PREFIX="# "
>>>    
>>> -while getopts "aht:n" OPT; do
>>> +while getopts "aht:nd" OPT; do
>>>    	case ${OPT} in
>>>    		"a") RUN_ALL=true ;;
>>>    		"h") usage ;;
>>> -- 
>>> 2.53.0
> 



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

* Re: [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation
  2026-04-27 16:55     ` Luiz Capitulino
@ 2026-04-27 16:58       ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2026-04-27 16:58 UTC (permalink / raw)
  To: Luiz Capitulino
  Cc: Mike Rapoport, Linux Memory Management List,
	David Hildenbrand (Red Hat), Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Suren Baghdasaryan, Michal Hocko, Shuah Khan,
	linux-kselftest, LKML, Muhammad Usama Anjum

On Mon, 27 Apr 2026 12:55:34 -0400 Luiz Capitulino <luizcap@redhat.com> wrote:

> Andrew, do you need a v2 or can you edit the patch description for me?
> 

All done, thanks.

From: Luiz Capitulino <luizcap@redhat.com>
Subject: selftests/mm: run_vmtests.sh: fix destructive tests invocation
Date: Mon, 27 Apr 2026 12:03:51 -0400

Destructive tests should be invoked with -d command-line option, but
this won't work today since 'd' is missing in getopts command-line.  This
commit fixes it.

Link: https://lore.kernel.org/214fd9e4-5398-4c26-859e-c982c2e277c3@redhat.com
Fixes: f16ff3b692ad ("selftests/mm: run_vmtests.sh: add missing tests")
Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.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: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/run_vmtests.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/testing/selftests/mm/run_vmtests.sh~selftests-mm-run_vmtestssh-fix-destructive-tests-invocation
+++ a/tools/testing/selftests/mm/run_vmtests.sh
@@ -103,7 +103,7 @@ RUN_ALL=false
 RUN_DESTRUCTIVE=false
 TAP_PREFIX="# "
 
-while getopts "aht:n" OPT; do
+while getopts "aht:nd" OPT; do
 	case ${OPT} in
 		"a") RUN_ALL=true ;;
 		"h") usage ;;
_



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

* Re: [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation
  2026-04-27 16:03 [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation Luiz Capitulino
  2026-04-27 16:12 ` Andrew Morton
@ 2026-04-28  0:17 ` SeongJae Park
  1 sibling, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2026-04-28  0:17 UTC (permalink / raw)
  To: Luiz Capitulino
  Cc: SeongJae Park, Linux Memory Management List, Andrew Morton,
	Mike Rapoport, David Hildenbrand (Red Hat), Lorenzo Stoakes,
	Liam R. Howlett, Vlastimil Babka, Suren Baghdasaryan,
	Michal Hocko, Shuah Khan, linux-kselftest, LKML

On Mon, 27 Apr 2026 12:03:51 -0400 Luiz Capitulino <luizcap@redhat.com> wrote:

> Destructive tests should be invocated with -d command-line option, but
> this won't work today since 'd' is missing in getopts command-line. This
> commit fixes it.

Nice catch!

> 
> Signed-off-by: Luiz Capitulino <luizcap@redhat.com>

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

[...]


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 16:03 [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation Luiz Capitulino
2026-04-27 16:12 ` Andrew Morton
2026-04-27 16:49   ` Mike Rapoport
2026-04-27 16:55     ` Luiz Capitulino
2026-04-27 16:58       ` Andrew Morton
2026-04-28  0:17 ` SeongJae Park

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