compare-ktest-sample.pl 563 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env 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. }