mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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>
This commit is contained in:
parent
d53cdda3fd
commit
167234268c
|
|
@ -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*$/) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user