run_vmtests.sh can reach test setup after invalid options or category selections. Its memfd_secret preparation can also change ptrace_scope when that category was not selected. Patch 1 rejects invalid selections before setup, using the category list in usage(). Patch 2 gates memfd_secret preparation on category selection and executable presence. I am resending from my Gmail address after delivery problems with my previous address. I could not confirm delivery of the earlier v3 posting. This series is rebased onto current mm-unstable; both patches are unchanged from v3 according to range-diff. Neither fix is present in current mm-unstable, mm-stable or mainline. Changes in v3: - Initialize VM_SELFTEST_ITEMS to "default" before getopts, as David suggested. Only -t changes the selection. - Use Assisted-by: LLM in both patches. - Add David's Acked-by to patch 2, whose code is unchanged from v2. Validation after rebasing: - Bash syntax, whitespace and checkpatch checks passed. - Ten invalid option/category invocations and help passed before setup. - Rebuilt the four focused test binaries and ran the rebased script in an x86-64 KVM guest. mmap, memfd_secret, combined selections, tab/newline separators and repeated -t with the final selection taking effect all passed. - The guest lacks Yama. The ptrace_scope write condition was checked with a disposable file at the expected path, not Yama policy enforcement. This is focused validation, not a run of the complete MM selftest suite. v2: https://lore.kernel.org/r/178886112560.138404.1278745290043112298.mm-cli-v2-0@tychen.cc Tianyi Chen (2): selftests/mm: Reject invalid test selections before running tests selftests/mm: Only prepare ptrace_scope when memfd_secret is selected
Hi David, Following up on your review: https://lore.kernel.org/r/d6ca7f47-39bb-43b4-92d6-63ccc148ebdd@kernel.org > Who would set it at this point? > Can't this just be > VM_SELFTEST_ITEMS="default" V3 makes that change: the default is initialized before getopts, and only -t changes the selection. An explicit empty -t still fails validation. Both patches use Assisted-by: LLM, and patch 2 carries your Acked-by. I have resent v3 at the start of this new thread from my Gmail address after delivery problems with my previous address. The patches are rebased onto current mm-unstable without changes, and the focused parser and VM selection tests passed again. Thanks for the review and the ack. Tianyi
On 9/9/26 16:54, Tianyi Chen wrote: > Hi David, > > Following up on your review: > https://lore.kernel.org/r/d6ca7f47-39bb-43b4-92d6-63ccc148ebdd@kernel.org > >> Who would set it at this point? >> Can't this just be >> VM_SELFTEST_ITEMS="default" > > V3 makes that change: the default is initialized before getopts, and only > -t changes the selection. An explicit empty -t still fails validation. > Both patches use Assisted-by: LLM, and patch 2 carries your Acked-by. > > I have resent v3 at the start of this new thread from my Gmail address > after delivery problems with my previous address. The patches are rebased > onto current mm-unstable without changes, and the focused parser and VM > selection tests passed again. That is new: $ b4 shazam https://lore.kernel.org/r/CACGbirR9PNt4uhqJFATsOWnwmsNb-v8zau-Rb+9Q5SZmY-=Vug@mail.gmail.com Looking up https://lore.kernel.org/all/CACGbirR9PNt4uhqJFATsOWnwmsNb-v8zau-Rb%2B9Q5SZmY-%3DVug@mail.gmail.com/ Grabbing thread from lore.kernel.org/all/CACGbirR9PNt4uhqJFATsOWnwmsNb-v8zau-Rb%2B9Q5SZmY-%3DVug@mail.gmail.com/t.mbox.gz Checking for newer revisions Grabbing search results from lore.kernel.org Analyzing 4 messages in the thread Analyzing 14 code-review messages Checking attestation on all messages, may take a moment... --- ✓ [PATCH v3 1/2] selftests/mm: Reject invalid test selections before running tests ✓ [PATCH v3 2/2] selftests/mm: Only prepare ptrace_scope when memfd_secret is selected --- ✓ Signed: DKIM/gmail.com --- Total patches: 2 --- Applying: selftests/mm: Reject invalid test selections before running tests Patch failed at 0001 selftests/mm: Reject invalid test selections before running tests error: git diff header lacks filename information when removing 1 leading pathname component at /home/dishy/linux/.git/rebase-apply/patch:6 -- Cheers, David
On 9/9/26 17:02, David Hildenbrand (Arm) wrote: > On 9/9/26 16:54, Tianyi Chen wrote: >> Hi David, >> >> Following up on your review: >> https://lore.kernel.org/r/d6ca7f47-39bb-43b4-92d6-63ccc148ebdd@kernel.org >> >>> Who would set it at this point? >>> Can't this just be >>> VM_SELFTEST_ITEMS="default" >> >> V3 makes that change: the default is initialized before getopts, and only >> -t changes the selection. An explicit empty -t still fails validation. >> Both patches use Assisted-by: LLM, and patch 2 carries your Acked-by. >> >> I have resent v3 at the start of this new thread from my Gmail address >> after delivery problems with my previous address. The patches are rebased >> onto current mm-unstable without changes, and the focused parser and VM >> selection tests passed again. > > That is new: > > $ b4 shazam https://lore.kernel.org/r/CACGbirR9PNt4uhqJFATsOWnwmsNb-v8zau-Rb+9Q5SZmY-=Vug@mail.gmail.com > Looking up https://lore.kernel.org/all/CACGbirR9PNt4uhqJFATsOWnwmsNb-v8zau-Rb%2B9Q5SZmY-%3DVug@mail.gmail.com/ > Grabbing thread from lore.kernel.org/all/CACGbirR9PNt4uhqJFATsOWnwmsNb-v8zau-Rb%2B9Q5SZmY-%3DVug@mail.gmail.com/t.mbox.gz > Checking for newer revisions > Grabbing search results from lore.kernel.org > Analyzing 4 messages in the thread > Analyzing 14 code-review messages > Checking attestation on all messages, may take a moment... > --- > ✓ [PATCH v3 1/2] selftests/mm: Reject invalid test selections before running tests > ✓ [PATCH v3 2/2] selftests/mm: Only prepare ptrace_scope when memfd_secret is selected > --- > ✓ Signed: DKIM/gmail.com > --- > Total patches: 2 > --- > Applying: selftests/mm: Reject invalid test selections before running tests > Patch failed at 0001 selftests/mm: Reject invalid test selections before running tests > error: git diff header lacks filename information when removing 1 leading pathname component at /home/dishy/linux/.git/rebase-apply/patch:6 > > I think what's happening is that something in your mail sending path wraps long lines and breaks the patch format. -- Cheers, David
Hi David, > I think what's happening is that something in your mail sending path wraps long > lines and breaks the patch format. You were right. I reproduced the same b4 error using an externally received copy: outbound delivery wrapped the diff header and removed whitespace. The copy in my Gmail Sent folder was intact, so my earlier check missed the corruption. Sorry for the trouble. I have resent the unchanged series as text/plain attachments: https://lore.kernel.org/r/CACGbirTvSoSeNSpMCBiifTdRKKDsKbgk7nfvh=09fHw2b0M4Ew@mail.gmail.com I verified the externally received attachments through b4 and git am. They reproduce the prepared tree and retain the original authorship and your Acked-by on patch 2. I will use this Gmail address for follow-up, given the delivery problems with my previous address. Thanks, Tianyi
© 2016 - 2026 Red Hat, Inc.