diff options
| author | Steven Rostedt <rostedt@goodmis.org> | 2025-07-18 16:18:43 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2025-07-21 16:31:04 -0400 |
| commit | acd98e230ee86a9812c56a081929248cdbe412fa (patch) | |
| tree | f599c199064bd48da82b51b7a6a6e380a323fa0c | |
| parent | 3bcdb6e90c9f5403e764dc9cdbe7907026de59a0 (diff) | |
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" <warthog9@kernel.org>
Cc: Dhaval Giani <dhaval.giani@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/20250718202053.567246162@kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 7b94b9b83ee7..95e62929cda7 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 { |
