Gilles Peskine
907cb020ef
Merge pull request #8618 from Ryan-Everett-arm/new-state-transition-documentation
...
Update thread safety state transition documentation
2023-12-21 12:09:58 +00:00
Gilles Peskine
0e6fdc4f1d
Merge pull request #8342 from yanesca/threading_test_pc
...
Threading test proof of concept and plan
2023-12-21 12:08:41 +00:00
Waleed Elmelegy
049cd302ed
Refactor record size limit extension handling
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-12-20 17:28:31 +00:00
Tomi Fontanilles
9c69348c24
pk test suite: rename the parameter named parameter
...
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
8174662b64
pk: implement non-PSA mbedtls_pk_sign_ext()
...
This makes the function always available with its
its implementation depending on MBEDTLS_USE_PSA_CRYPTO.
Related dependencies and tests are updated as well.
Fixes #7583 .
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Valerio Setti
5f665c3a0d
analyze_outcomes: add exceptions to disparities for block_cipher dispatch
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 09:56:05 +01:00
Valerio Setti
9afa329b80
analyze_outcomes: allow ignored test suites to have a dot in the name
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 09:55:28 +01:00
Valerio Setti
45c84feacc
test_suite_ccm: add missing BLOCK_CIPHER_PSA_[INIT/DONE]()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 09:54:39 +01:00
Valerio Setti
689c0f71cb
tests: use new CCM/GCM capability macros in tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 09:54:18 +01:00
Valerio Setti
4a8ef7cd9b
all.sh: disable legacy AES/ARIA/CAMELLIA in test_full_block_cipher_psa_dispatch
...
This commit also:
- rename the reference component as component_test_full_block_cipher_legacy_dispatch()
- add a common configuration function, named common_block_cipher_dispatch() that
is used from both accelerated and reference components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 07:35:41 +01:00
Dave Rodgman
c393222643
Work around clang 3.8 bug
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 18:52:35 +00:00
Dave Rodgman
fc5b9553b2
Don't use full path for setting CC
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 16:08:19 +00:00
Dave Rodgman
bc8e61d962
Use gcc in test_full_deprecated_warning
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 14:07:15 +00:00
Dave Rodgman
d8d6451a6e
Add -O2 to some CFLAGS which were not setting it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 12:20:21 +00:00
Dave Rodgman
ea03ef9a77
Don't specify gcc unless the test requires it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 12:19:59 +00:00
Dave Rodgman
dfe5ce81ee
Use clang -O2 in common_block_cipher_no_decrypt
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 11:47:18 +00:00
Dave Rodgman
590519f535
Enable -O2 in depends.py
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 11:33:55 +00:00
Valerio Setti
9da01a7f53
all.sh: rename test_psa_crypto_config_accel_cipher to accel_des
...
Renaming this test component in order to better explain what it
really does.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-19 08:05:40 +01:00
Dave Rodgman
d0a594d444
Use gcc in test_psa_compliance
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-18 22:29:56 +00:00
Dave Rodgman
932ce859d5
Ensure test_psa_compliance uses gcc
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-18 20:35:54 +00:00
Dave Rodgman
0c5bfe816f
Ensure clang is present
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-18 19:53:25 +00:00
Dave Rodgman
66cbc83844
Use clang by default
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-18 18:34:50 +00:00
Paul Elliott
22dbaf05b6
Add AES_PSA_INIT() to thread test case
...
Tests were failing when PSA was being used in ctr_drbg_seed() as PSA was
not initialised.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 18:18:04 +00:00
Paul Elliott
445af3c25a
Move test dependancies to function file
...
Dependancies are determined by code in this case.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
79dc6dad81
Improve make pthread linking mechanism
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
40f0ec246e
Remove requirement for SHA512 from ctr_drbg test
...
Set the entropy len prior to doing the test to ensure the outcome is the
same regardless of whether SHA512 or SHA256 is used.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
20a95bc09a
Remove explicit linking of PThread in make
...
This would break platforms that do not have pthread. Put the linking
instead behind a define and add this define where required to all.sh.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
6587959a32
Add ability to pass make variables to psa_collect_statuses.py
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
be978a8c4f
Add option to pass make variables to depends.py
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
356597f077
Make TSan test run operate on full config
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
bb0e48f94f
Make number of threads a test argument
...
Remove hard coded number of threads.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
fed410f58e
Increase entropy buffer sizes
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
811c600d88
Guard tests correctly
...
All guarded options change output, thus failing the test.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
6a997c9994
Fix code style
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
2667eda785
Explicitly link tests with pthreads
...
Required to use pthreads within tests.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
bda25dd29c
Add re-seeding option to test
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Paul Elliott
20b2efa293
Fix missing include
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:33 +00:00
Janos Follath
178bf3ee8a
Fix failing multi-threaded unit test
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-12-18 14:49:33 +00:00
Janos Follath
a16ee6b7d4
Add multi-threaded unit test
...
The unit test we add is designed to fail. The goal is to test the tests
and show that they catch the problem. A later commit will fix the unit
test and will make it pass.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-12-18 14:49:33 +00:00
Janos Follath
9338cac050
Add tsan to all.sh
...
component_test_tsan now builds and tests the library with
clang ThreadSanitizer enabled.
There are no multi-threaded unit tests so far, the goal is that they are
automatically tested with TSan when they are added.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-12-18 14:49:33 +00:00
Bence Szépkúti
71c71eb91c
all.sh: Parse arguments before checking if a test is supported
...
Support for each test was checked before the command line had been
parsed, causing the support_ functions to ignore arguments that set a
tool's location.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2023-12-15 20:27:50 +01:00
Dave Rodgman
543d275c68
Merge pull request #8635 from daverodgman/asan-opt
...
CI perf - prefer clang for Asan
2023-12-15 13:25:02 +00:00
Ryan Everett
abd8977cc1
Make check_files ignore png files in docs
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-15 12:33:38 +00:00
Dave Rodgman
d5635e95e2
Undo accidental change
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-15 11:04:34 +00:00
Dave Rodgman
a2cf240fff
Add explanatory comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-15 11:04:13 +00:00
Dave Rodgman
c1f0f5b8af
Fix a typo
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-14 23:34:48 +00:00
Dave Rodgman
b90f87b9a8
Use gcc for -m32 Asan builds
...
There seem to be known issues with clang for this target.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-14 23:27:39 +00:00
Dave Rodgman
815b240d72
Fix unused function/variable warnings from clang
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-14 23:20:48 +00:00
Dave Rodgman
17127e9f39
Use clang as default compiler for Asan
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-14 19:34:52 +00:00
Valerio Setti
52ab8fa565
analyze_outcomes/all.sh: add reference component and entry for coverage comparison
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-14 18:09:26 +01:00