From: Steven Rostedt Date: Mon, 8 Nov 2010 21:45:50 +0000 (-0500) Subject: ktest: Allow a test case to undefine a default value X-Git-Tag: firefly_0821_release~7613^2~3046^2~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=21a9679feadf6b215c4f932b0df5d252b4822c45;p=firefly-linux-kernel-4.4.55.git ktest: Allow a test case to undefine a default value Allow a test case in the config file to undefine a default value by specifying the option and equal sign but not assigning it a value: OPTION = Signed-off-by: Steven Rostedt --- diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 3d88be784df0..962c0f773e20 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -97,6 +97,11 @@ sub set_value { die "Error: Option $lvalue defined more than once!\n"; } $opt{$lvalue} = $rvalue; + if ($rvalue =~ /^\s*$/) { + delete $opt{$lvalue}; + } else { + $opt{$lvalue} = $rvalue; + } } sub read_config {