diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-07-01 18:09:23 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-07-01 18:09:23 +0300 |
commit | 167234268cf6cb932ffb180586f3874ae3293a55 (patch) | |
tree | e3a46b3eb4c3239e9a8024687fdf413f0d4eb0d4 /tools/testing/ktest | |
parent | d53cdda3fda6e737151e091c7d9388c31a73c828 (diff) | |
download | linux-167234268cf6cb932ffb180586f3874ae3293a55.tar.xz |
ktest.pl: Add a NOT operator
There is a NOT DEFINED operator, but there is not an operator that can
negate any other expression.
For example: NOT (${FOO} == boot || ${BAR} == run)
Add the keyword NOT to allow the ktest.pl config files to negate operators.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index f99cf633ed84..0d04b8a2b5a2 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -911,6 +911,12 @@ sub process_expression { } } + if ($val =~ s/^\s*NOT\s+(.*)//) { + my $express = $1; + my $ret = process_expression($name, $express); + return !$ret; + } + if ($val =~ /^\s*0\s*$/) { return 0; } elsif ($val =~ /^\s*\d+\s*$/) { |