compare-ktest-sample.pl 559 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/perl
  2. # SPDX-License-Identifier: GPL-2.0
  3. open (IN,"ktest.pl");
  4. while (<IN>) {
  5. # hashes are now used
  6. if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ ||
  7. /^\s*"?([A-Z].*?)"?\s*=>\s*/ ||
  8. /set_test_option\("(.*?)"/) {
  9. $opt{$1} = 1;
  10. }
  11. }
  12. close IN;
  13. open (IN, "sample.conf");
  14. while (<IN>) {
  15. if (/^\s*#?\s*([A-Z]\S*)\s*=/) {
  16. $samp{$1} = 1;
  17. }
  18. }
  19. close IN;
  20. foreach $opt (keys %opt) {
  21. if (!defined($samp{$opt})) {
  22. print "opt = $opt\n";
  23. }
  24. }
  25. foreach $samp (keys %samp) {
  26. if (!defined($opt{$samp})) {
  27. print "samp = $samp\n";
  28. }
  29. }