mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
![Steven Rostedt](/assets/img/avatar_default.png)
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>
32 lines
524 B
Perl
Executable file
32 lines
524 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
open (IN,"ktest.pl");
|
|
while (<IN>) {
|
|
# hashes are now used
|
|
if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ ||
|
|
/^\s*"?([A-Z].*?)"?\s*=>\s*/ ||
|
|
/set_test_option\("(.*?)"/) {
|
|
$opt{$1} = 1;
|
|
}
|
|
}
|
|
close IN;
|
|
|
|
open (IN, "sample.conf");
|
|
while (<IN>) {
|
|
if (/^\s*#?\s*([A-Z]\S*)\s*=/) {
|
|
$samp{$1} = 1;
|
|
}
|
|
}
|
|
close IN;
|
|
|
|
foreach $opt (keys %opt) {
|
|
if (!defined($samp{$opt})) {
|
|
print "opt = $opt\n";
|
|
}
|
|
}
|
|
|
|
foreach $samp (keys %samp) {
|
|
if (!defined($opt{$samp})) {
|
|
print "samp = $samp\n";
|
|
}
|
|
}
|