mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Exclude full-length-algorithm macros from testing
Calls to PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_FULL_LENGTH_MAC are not in canonical form, so exclude them from the list of constructor macros to test.
This commit is contained in:
		
							parent
							
								
									434899fccd
								
							
						
					
					
						commit
						c68ce9637a
					
				| @ -127,6 +127,9 @@ where each argument takes each possible value at least once.''' | |||||||
|                    r'(?:\(([^\n()]*)\))?') |                    r'(?:\(([^\n()]*)\))?') | ||||||
|     # Regex of macro names to exclude. |     # Regex of macro names to exclude. | ||||||
|     excluded_name_re = re.compile('_(?:GET|IS|OF)_|_(?:BASE|FLAG|MASK)\Z') |     excluded_name_re = re.compile('_(?:GET|IS|OF)_|_(?:BASE|FLAG|MASK)\Z') | ||||||
|  |     # Additional excluded macros. | ||||||
|  |     excluded_names = set(['PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH', | ||||||
|  |                           'PSA_ALG_FULL_LENGTH_MAC']) | ||||||
|     argument_split_re = re.compile(r' *, *') |     argument_split_re = re.compile(r' *, *') | ||||||
|     def parse_header_line(self, line): |     def parse_header_line(self, line): | ||||||
|         '''Parse a C header line, looking for "#define PSA_xxx".''' |         '''Parse a C header line, looking for "#define PSA_xxx".''' | ||||||
| @ -134,7 +137,8 @@ where each argument takes each possible value at least once.''' | |||||||
|         if not m: |         if not m: | ||||||
|             return |             return | ||||||
|         name = m.group(1) |         name = m.group(1) | ||||||
|         if re.search(self.excluded_name_re, name): |         if re.search(self.excluded_name_re, name) or \ | ||||||
|  |            name in self.excluded_names: | ||||||
|             return |             return | ||||||
|         dest = self.table_by_prefix.get(m.group(2)) |         dest = self.table_by_prefix.get(m.group(2)) | ||||||
|         if dest is None: |         if dest is None: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Gilles Peskine
						Gilles Peskine