cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

compare-ktest-sample.pl (563B)


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