Re: [PATCH] selftests/mm: run_vmtests.sh: fix destructive tests invocation

From: Mike Rapoport

Date: Mon Apr 27 2026 - 12:50:09 EST


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@xxxxxxxxxx> 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@xxxxxxxxxx>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

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