Skip to content

Commit

Permalink
Update references to tests/src and tests/include
Browse files Browse the repository at this point in the history
These are references that are part of the PSA shared memory testing
work and thus were not previously updated.

Signed-off-by: David Horstmann <[email protected]>
  • Loading branch information
davidhorstmann-arm committed Apr 4, 2024
1 parent 740b63b commit 14ba492
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/architecture/psa-shared-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ psa_status_t mem_poison_psa_aead_update(psa_aead_operation_t *operation,
#define psa_aead_update(...) mem_poison_psa_aead_update(__VA_ARGS__)
```

There now exists a more generic mechanism for making exactly this kind of transformation - the PSA test wrappers, which exist in the files `tests/include/test/psa_test_wrappers.h` and `tests/src/psa_test_wrappers.c`. These are wrappers around all PSA functions that allow testing code to be inserted at the start and end of a PSA function call.
There now exists a more generic mechanism for making exactly this kind of transformation - the PSA test wrappers, which exist in the files `framework/include/test/psa_test_wrappers.h` and `framework/src/psa_test_wrappers.c`. These are wrappers around all PSA functions that allow testing code to be inserted at the start and end of a PSA function call.

The test wrappers are generated by a script, although they are not automatically generated as part of the build process. Instead, they are checked into source control and must be manually updated when functions change by running `tests/scripts/generate_psa_wrappers.py`.

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/check-generated-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ fi
# Generated files that are present in the repository even in the development
# branch. (This is intended to be temporary, until the generator scripts are
# fully reviewed and the build scripts support a generated header file.)
check tests/scripts/generate_psa_wrappers.py tests/include/test/psa_test_wrappers.h tests/src/psa_test_wrappers.c
check tests/scripts/generate_psa_wrappers.py framework/include/test/psa_test_wrappers.h framework/src/psa_test_wrappers.c
4 changes: 2 additions & 2 deletions tests/scripts/generate_psa_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ def _printf_parameters(self, typ: str, var: str) -> Tuple[str, List[str]]:
return super()._printf_parameters(typ, var)


DEFAULT_C_OUTPUT_FILE_NAME = 'tests/src/psa_test_wrappers.c'
DEFAULT_H_OUTPUT_FILE_NAME = 'tests/include/test/psa_test_wrappers.h'
DEFAULT_C_OUTPUT_FILE_NAME = 'framework/src/psa_test_wrappers.c'
DEFAULT_H_OUTPUT_FILE_NAME = 'framework/include/test/psa_test_wrappers.h'

def main() -> None:
parser = argparse.ArgumentParser(description=globals()['__doc__'])
Expand Down

0 comments on commit 14ba492

Please sign in to comment.