mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	tests: Fine tune handling of policy negative tests
Fine tune handling of policy negative tests when setting automatically PSA crypto unit tests dependencies. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
		
							parent
							
								
									6ac020d797
								
							
						
					
					
						commit
						9838dc2702
					
				@ -165,9 +165,14 @@ def systematic_dependencies(file_name, function_name, arguments):
 | 
				
			|||||||
    deps = set()
 | 
					    deps = set()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Run key policy negative tests even if the algorithm to attempt performing
 | 
					    # Run key policy negative tests even if the algorithm to attempt performing
 | 
				
			||||||
    # is not supported.
 | 
					    # is not supported but in the case where the test is to check an
 | 
				
			||||||
 | 
					    # incompatibility between a requested algorithm for a cryptographic
 | 
				
			||||||
 | 
					    # operation and a key policy. In the latter, we want to filter out the
 | 
				
			||||||
 | 
					    # cases # where PSA_ERROR_NOT_SUPPORTED is returned instead of
 | 
				
			||||||
 | 
					    # PSA_ERROR_NOT_PERMITTED.
 | 
				
			||||||
    if function_name.endswith('_key_policy') and \
 | 
					    if function_name.endswith('_key_policy') and \
 | 
				
			||||||
       arguments[-1].startswith('PSA_ERROR_'):
 | 
					       arguments[-1].startswith('PSA_ERROR_') and \
 | 
				
			||||||
 | 
					       arguments[-1] != ('PSA_ERROR_NOT_PERMITTED'):
 | 
				
			||||||
        arguments[-2] = ''
 | 
					        arguments[-2] = ''
 | 
				
			||||||
    if function_name == 'copy_fail' and \
 | 
					    if function_name == 'copy_fail' and \
 | 
				
			||||||
       arguments[-1].startswith('PSA_ERROR_'):
 | 
					       arguments[-1].startswith('PSA_ERROR_'):
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user