mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Tianyi Chen <hi@tychen.cc>, Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, Joel Savitz <jsavitz@redhat.com>
Subject: Re: [PATCH RESEND] selftests/mm: Exit on invalid command-line options
Date: Mon, 7 Sep 2026 13:47:27 +0200	[thread overview]
Message-ID: <519ef70a-679c-455f-ba5f-3841730873a4@kernel.org> (raw)
In-Reply-To: <20260906135444.749144-1-hi@tychen.cc>

On 9/6/26 15:54, Tianyi Chen wrote:
> getopts reports unknown options and missing option arguments, but
> run_vmtests.sh ignores its error result and continues running tests.
> For example, passing -z or omitting the argument to -t can run the
> default test selection instead of rejecting the command.
> 
> Exit with failure when getopts reports an error, before any tests or
> their setup run. Keep the diagnostic provided by getopts.
> 
> Verified that -z, -t and -t mmap -z exit with status 1, while -h still
> exits with status 0. The mmap category's three test programs pass in
> a VM running the kernel built from the same source tree.

I wonder whether we also bail out on wrong/missing categories?

It's also interesting that we do the /proc/sys/kernel/yama/ptrace_scope stuff
even when not actually running the memfd_secret test.

-- 
Cheers,

David

  reply	other threads:[~2026-09-07 11:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ZTYJZT7Q8UU4.KPP9BUAAJVQO1@mailcore-89d674988-v7w7p>
2026-09-06 13:54 ` Tianyi Chen
2026-09-07 11:47   ` David Hildenbrand (Arm) [this message]
2026-09-08  9:55     ` Tianyi Chen
2026-09-08  9:55   ` [PATCH v2 0/2] selftests/mm: Validate selections and scope memfd_secret setup Tianyi Chen
2026-09-08  9:55     ` [PATCH v2 1/2] selftests/mm: Reject invalid test selections before running tests Tianyi Chen
2026-09-08 10:13       ` David Hildenbrand (Arm)
2026-09-08  9:55     ` [PATCH v2 2/2] selftests/mm: Only prepare ptrace_scope when memfd_secret is selected Tianyi Chen
2026-09-08 10:14       ` David Hildenbrand (Arm)
2026-09-08 10:15     ` [PATCH v2 0/2] selftests/mm: Validate selections and scope memfd_secret setup David Hildenbrand (Arm)

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=519ef70a-679c-455f-ba5f-3841730873a4@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hi@tychen.cc \
    --cc=jsavitz@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@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 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®