提交 16723426 编写于 作者: S Steven Rostedt (VMware)

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: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 d53cdda3
......@@ -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*$/) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册