Skip to content

Commit c2857cb

Browse files
Steven Rostedtrostedt
authored andcommitted
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 <rostedt@goodmis.org>
1 parent 9cc9e09 commit c2857cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tools/testing/ktest/compare-ktest-sample.pl‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
open (IN,"ktest.pl");
44
while (<IN>) {
5+
# hashes are now used
56
if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ ||
7+
/^\s*"?([A-Z].*?)"?\s*=>\s*/ ||
68
/set_test_option\("(.*?)"/) {
79
$opt{$1} = 1;
810
}
@@ -11,7 +13,7 @@
1113

1214
open (IN, "sample.conf");
1315
while (<IN>) {
14-
if (/^\s*#?\s*(\S+)\s*=/) {
16+
if (/^\s*#?\s*([A-Z]\S*)\s*=/) {
1517
$samp{$1} = 1;
1618
}
1719
}

0 commit comments

Comments
 (0)