Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 2241ab53cbb5cdb08a6b2d4688feb13971058f65 authored by Linus Torvalds on 22 January 2023, 00:27:01 UTC
Linux 6.2-rc5
Tip revision: 2241ab5
compare-ktest-sample.pl
#!/usr/bin/env perl
# SPDX-License-Identifier: GPL-2.0

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