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. This replaces my earlier Gmail resend, whose outbound delivery wrapped long lines and damaged patch whitespace. Thanks to David for reporting it. The patches are unchanged and are attached as text/plain to preserve their contents. I switched to Gmail because my previous address had delivery problems. Both patches remain based on mm-unstable b02c77c78ff7. The parser checks and focused VM selection tests reported in the previous posting passed; there are no code changes in this resend. 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

