From: Steven Rostedt Date: Fri, 18 Jul 2025 20:18:43 +0000 (-0400) Subject: ktest.pl: Have -D option work without a space X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acd98e230ee86a9812c56a081929248cdbe412fa;p=thirdparty%2Flinux.git ktest.pl: Have -D option work without a space Allow -DBUILD_TYPE=boot work the same as -D BUILD_TYPE=boot just like normal single character option does in most applications. Cc: "John Warthog9 Hawley" Cc: Dhaval Giani Cc: Greg KH Link: https://lore.kernel.org/20250718202053.567246162@kernel.org Signed-off-by: Steven Rostedt --- diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 7b94b9b83ee78..95e62929cda7d 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4297,6 +4297,15 @@ while ( $#ARGV >= 0 ) { $command_vars[$#command_vars + 1] = $val; } + } elsif ( $ARGV[0] =~ m/^-D(.*)/) { + my $val = $1; + shift; + + if ($val =~ m/(.*?):=(.*)$/) { + set_variable($1, $2, 1); + } else { + $command_vars[$#command_vars + 1] = $val; + } } elsif ( $ARGV[0] eq "-h" ) { die_usage; } else {