Run copy_fail even when the target policy is unsupported

The negative test cases for psa_copy_key() don't actually care whether
the target policy is supported. This is similar to _key_policy tests.
Add a similar rule.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-01-12 21:15:52 +01:00
parent fa37961413
commit b51d72f82e
2 changed files with 10 additions and 6 deletions

View file

@ -166,6 +166,10 @@ def systematic_dependencies(file_name, function_name, arguments):
if function_name.endswith('_key_policy') and \
arguments[-1].startswith('PSA_ERROR_'):
arguments[-2] = ''
if function_name == 'copy_fail' and \
arguments[-1].startswith('PSA_ERROR_'):
arguments[-2] = ''
arguments[-3] = ''
for arg in arguments:
for symbol in re.findall(r'PSA_(?:ALG|KEY_TYPE)_\w+', arg):