[PATCH v3 RESEND 0/2] selftests/mm: Validate selections and scope memfd_secret setup

From: Tianyi Chen

Date: Thu Sep 10 2026 - 08:57:49 EST


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. Patch 2 gates
memfd_secret preparation on category selection and executable presence.

The patches and commit messages are unchanged from v3. This resend uses
git send-email through Gmail's SMTP server to send the patches inline.
Before resending, I sent them to my SpaceMail mailbox and verified the
received contents and whitespace. Both patches passed git apply --check
and git am, and the resulting trees matched the original commits.

David, this is my first time setting up Gmail SMTP for patch submission.
I'm very sorry for the formatting problems I caused and for taking up
so much of your time. Thank you for your patience.

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.
- Carry David's Acked-by on patch 2, unchanged from v2.

Tianyi Chen (2):
selftests/mm: Reject invalid test selections before running tests
selftests/mm: Only prepare ptrace_scope when memfd_secret is selected

tools/testing/selftests/mm/run_vmtests.sh | 28 +++++++++++++++++++----
1 file changed, 23 insertions(+), 5 deletions(-)

--
2.55.0