selftests/bpf: Reject unsupported -k option in vmtest.sh

vmtest.sh does not document a -k option and does not handle it in the
getopts case statement. However, the getopts optstring includes k, which
causes the script to accept -k silently instead of reporting it as an
invalid option.

Remove k from the optstring so unsupported options are rejected through
the existing invalid-option path.

Fixes: c9709f5238 ("bpf: Helper script for running BPF presubmit tests")
Signed-off-by: Roman Kvasnytskyi <roman@kvasnytskyi.net>
Acked-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/r/20260516120625.80839-1-roman@kvasnytskyi.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Roman Kvasnytskyi 2026-05-16 14:06:25 +02:00 committed by Alexei Starovoitov
parent 879daba303
commit 6df582112a

View File

@ -382,7 +382,7 @@ main()
local exit_command="poweroff -f"
local debug_shell="no"
while getopts ':hskl:id:j:' opt; do
while getopts ':hsl:id:j:' opt; do
case ${opt} in
l)
LOCAL_ROOTFS_IMAGE="$OPTARG"