From: Steven Rostedt Date: Fri, 23 Dec 2011 03:06:59 +0000 (-0500) Subject: ktest: Fix compare script to test if options are not documented X-Git-Tag: v3.3-rc1~37^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c2857cb4a855aba0c3f826bcd0dfef72abb0995b;p=karo-tx-linux.git ktest: Fix compare script to test if options are not documented The compare script compare-ktest-sample.pl checks for options that are defined in ktest.pl and not documented in samples.conf, as well as samples in samples.conf that are not used in ktest.pl. With the switch to the hash format to initialize the ktest variables the compare script needs to be updated to handle the change. Signed-off-by: Steven Rostedt --- diff --git a/tools/testing/ktest/compare-ktest-sample.pl b/tools/testing/ktest/compare-ktest-sample.pl index 9a571e71683c..a373a5bfff68 100755 --- a/tools/testing/ktest/compare-ktest-sample.pl +++ b/tools/testing/ktest/compare-ktest-sample.pl @@ -2,7 +2,9 @@ open (IN,"ktest.pl"); while () { + # hashes are now used if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ || + /^\s*"?([A-Z].*?)"?\s*=>\s*/ || /set_test_option\("(.*?)"/) { $opt{$1} = 1; } @@ -11,7 +13,7 @@ close IN; open (IN, "sample.conf"); while () { - if (/^\s*#?\s*(\S+)\s*=/) { + if (/^\s*#?\s*([A-Z]\S*)\s*=/) { $samp{$1} = 1; } }