cryptomgmtlibs/securitytestfw/test/autotesting/panicscan_authserver.pl
changeset 8 35751d3474b7
parent 0 2c201484c85f
child 10 afc583cfa176
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
    34 # where anything non-zero for the first entry will skip the check for the file.
    34 # where anything non-zero for the first entry will skip the check for the file.
    35 # The match patterns are regular expressions.
    35 # The match patterns are regular expressions.
    36 
    36 
    37 my %expectedPanicsHash = ();
    37 my %expectedPanicsHash = ();
    38 
    38 
       
    39 # TCAF test expects CafUtils 0 panics
       
    40 push(@{$expectedPanicsHash{"TCAF_epocwind.txt"}}, (0,
       
    41 	("Thread tcaf.exe::Worker.*Panic CafUtils 0",6)));
       
    42 
    39 # tjavahelperserver test expects 4 kern-exec 0 panics
    43 # tjavahelperserver test expects 4 kern-exec 0 panics
    40 push(@{$expectedPanicsHash{"tjavahelperserver_epocwind.txt"}}, (0,
    44 push(@{$expectedPanicsHash{"tjavahelperserver_epocwind.txt"}}, (0,
    41 	("Thread tjavahelperserver.exe::Worker.*Panic KERN-EXEC 0", 5)));
    45 	("Thread tjavahelperserver.exe::Worker.*Panic KERN-EXEC 0", 5)));
    42 
    46 
    43 # Authserver test should be uncommented when it is released.
    47 # Authserver test should be uncommented when it is released.
    45 push(@{$expectedPanicsHash{"tauthexpr_epocwind.txt"}}, (0,
    49 push(@{$expectedPanicsHash{"tauthexpr_epocwind.txt"}}, (0,
    46 	("Thread tauthcliserv.exe::Worker.*Panic AuthServer 3", 1)));
    50 	("Thread tauthcliserv.exe::Worker.*Panic AuthServer 3", 1)));
    47 push(@{$expectedPanicsHash{"tauthcliserv_debug_epocwind.txt"}}, (0,
    51 push(@{$expectedPanicsHash{"tauthcliserv_debug_epocwind.txt"}}, (0,
    48 	("Thread tauthcliserv.exe::Worker.*Panic AUTHEXPR 64", 3)));
    52 	("Thread tauthcliserv.exe::Worker.*Panic AUTHEXPR 64", 3)));
    49 push(@{$expectedPanicsHash{"tauthsvr2_epocwind.txt"}}, (0,
    53 push(@{$expectedPanicsHash{"tauthsvr2_epocwind.txt"}}, (0,
    50 	("Thread AuthServer.EXE::!AuthServer Panic AuthServer 5", 2)));
    54 	("Thread AuthServer.EXE::Main Panic AuthServer 5", 3)));
    51 
    55 push(@{$expectedPanicsHash{"tpinplugin_epocwind.txt"}}, (0,
       
    56 	("Thread tpinplugin.exe::Worker.*Panic PINPLUGIN 1", 2)));
       
    57 	
    52 # crypto - padding related tests expect panics
    58 # crypto - padding related tests expect panics
    53 push(@{$expectedPanicsHash{"tpaddingudeb_epocwind.txt"}}, (0,
    59 push(@{$expectedPanicsHash{"tpaddingudeb_epocwind.txt"}}, (0,
    54 	("Thread tpaddingServer.exe::Worker.*Panic CRYPTO-LIB 1", 1)));
    60 	("Thread tpaddingserver.exe::Worker.*Panic CRYPTO-LIB 1", 1)));
       
    61 
       
    62 # Expected UPS panics
       
    63 push(@{$expectedPanicsHash{"tpolicycache_epocwind.txt"}}, (0,
       
    64 	("Thread tupspolicies.exe::Worker.*Panic UPS-Policies 0", 2)));
       
    65 push(@{$expectedPanicsHash{"tserviceconfig_epocwind.txt"}}, (0,
       
    66 	("Thread tupspolicies.exe::Worker.*Panic UPS-Policies 0", 1)));
       
    67 push(@{$expectedPanicsHash{"scstest_epocwind.txt"}}, 
       
    68     (0,
       
    69 	   ("Thread scstestserver.exe::Main Panic SCS-Server 0", 1),
       
    70        ("Thread scstest.exe::ScsTestPanic Panic SCS-Client 0", 1),
       
    71        ("Thread scstest.exe::ScsTestPanic Panic SCS-Client 1", 1),
       
    72        ("Thread scstest.exe::ScsTestPanic Panic SCS-Client 2", 1)
       
    73     ));
    55 
    74 
    56 die "EPOCROOT not defined, must specify directory" if !defined ($ENV{EPOCROOT});
    75 die "EPOCROOT not defined, must specify directory" if !defined ($ENV{EPOCROOT});
    57 
    76 
    58 # Searches for the most recently created Log directory
    77 # Searches for the most recently created Log directory
    59 my @logDirectories = glob("$ENV{EPOCROOT}logs_*\\winscw");
    78 my @logDirectories = glob("$ENV{EPOCROOT}logs_*\\winscw");
   100 			$skipCount++;
   119 			$skipCount++;
   101 			next;
   120 			next;
   102 			}
   121 			}
   103 		}
   122 		}
   104 
   123 
   105 	my @panicLines = grep(/panic/i, ReadListFromFile("$emulatorLogDirectory/$file"));
   124 	my @panicLines = grep(/Thread\s+.+\s+panic/i, ReadListFromFile("$emulatorLogDirectory/$file"));
   106 	my $failed = 0;
   125 	my $failed = 0;
   107 
   126 
   108 	if (@panicLines)
   127 	if (@panicLines)
   109 		{
   128 		{
   110 		if (@matchPatterns > 0)
   129 		if (@matchPatterns > 0)