Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 33688abb2802ff3a230bd2441f765477b94cc89e authored by Linus Torvalds on 20 June 2016, 04:30:02 UTC
Linux 4.7-rc4
Tip revision: 33688ab
compare-ktest-sample.pl
#!/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";
    }
}
back to top