Xiaofei Bai
f40545d919
Fix (d)tls1_2 into (d)tls12 in version options
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com >
2021-12-03 08:13:30 +00:00
Ronald Cron
0962370acf
all.sh: psa: Add cipher acceleration test component
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2021-11-30 14:49:19 +01:00
Ronald Cron
f7e483c0b4
all.sh: psa: Add hash acceleration test component
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2021-11-30 14:49:19 +01:00
Ronald Cron
d2c53e60ca
all.sh: psa: Add ECDSA and RSA signature acceleration component
...
Add ECDSA and RSA signature acceleration testing
with signature capabilitites removed from the
Mbed TLS library.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2021-11-30 14:49:19 +01:00
Ronald Cron
b814bdabe4
Move to separately compiled PSA test driver library
...
This commit removes the test_psa_crypto_config_basic
all.sh component that can no longer work without
adapting it to the separately compiled test driver
library. This component is replaced by several
components in the following commits to test various
type of acceleration independently.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2021-11-30 14:49:19 +01:00
Gilles Peskine
27482f17f1
Run the dlopen test in shared library builds
...
Non-regression for the fix in https://github.com/ARMmbed/mbedtls/pull/5126 :
libmbedtls and libmbedx509 did not declare their dependencies on libmbedx509
and libmbedcrypto when built with make.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-11-25 18:00:53 +01:00
Bence Szépkúti
2be65d5134
Remove expected failure from test_psa_compliance
...
Issue #5143 was fixed in PR #5192 .
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-17 14:47:56 +01:00
Manuel Pégourié-Gonnard
394c65e0f0
Merge pull request #5169 from bensze01/test_psa_compliance_2.x
...
Backport 2.x: Run the PSA Compliance test suite in all.sh
2021-11-17 14:10:05 +01:00
Bence Szépkúti
c1e79fd2e3
Enable CMAC for PSA crypto compliance tests
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-11 20:47:32 +01:00
Bence Szépkúti
24ec529f82
Multipart AEAD is not supported in Mbed TLS 2.x
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-11 20:47:29 +01:00
Bence Szépkúti
e30fcb6ed5
Remove superfluous expected failures from list
...
Issue #5144 doesn't affect development_2.x
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-11 16:24:19 +01:00
Bence Szépkúti
1dbaaba067
Build psa-arch-tests with MISSING_CRYPTO_1_0=1
...
This disables references to the missing multipart AEAD functions.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 17:44:37 +01:00
Bence Szépkúti
d1c6420aba
Move to a fork with Mbed TLS 2.x specific fixes
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 17:43:20 +01:00
Bence Szépkúti
340352ad74
Track upstreaming task in an issue
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
7ccbea6e47
Document the values in EXPECTED_FAILURES
...
Including the issues where the corresponding defects are tracked.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
355f8050cc
Move to an updated fork of psa-arch-tests
...
The new fork was rebased on top of the upstream master, removing the
need for most of the downstream patches we carried.
On the other hand, the new fork includes a couple of fixes to problems
that were not addressed by the original fork, or were introduced with the
new version of psa-arch-tests.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
d6cf089b37
Explain why support_test_psa_compliance is needed
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
bd66d184ff
Keep local clone around even if the test succeeds
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
eda2fb9583
Make directory creation code more compact
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
c2ca135f82
Add licence header to script
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:35 +01:00
Bence Szépkúti
559f1ce0a3
Make main() suitable to being called from python
...
Don't call sys.exit(), and don't clobber the working directory.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Bence Szépkúti
19a124d677
Fix pylint errors
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Bence Szépkúti
6025655598
Simplify regex and use named capture groups
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Bence Szépkúti
faf7f1b554
Use print(end='') to silence double newline
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Bence Szépkúti
f54a9d2adf
Indicate errors interleaved with test suite output
...
Indicate whether a success or failure is unexpected, or expected and
ignored as they happen.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Bence Szépkúti
ab796e656b
Make the changes easier to backport
...
The code replaced in this patch was not compatible with the
development_2.x branch.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Bence Szépkúti
9f84911d55
Run the PSA Compliance test suite in all.sh
...
This commit adds a component to all.sh which clones, builds and runs the
compliance test suite.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2021-11-10 14:56:34 +01:00
Przemyslaw Stekiel
292759319f
Fix rebase issue in generate_psa_tests.py
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-11-09 12:06:37 +01:00
Przemyslaw Stekiel
1ab3a5ca98
generate_psa_tests.py: add key generation result to test case argument list, add comments
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-11-09 12:01:19 +01:00
Przemyslaw Stekiel
0810108f12
Fix issues pointed by CI
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-11-09 12:01:14 +01:00
Przemyslaw Stekiel
c03b7c58d1
Remove unused param and duplicated test cases
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-11-09 11:55:58 +01:00
Przemyslaw Stekiel
32a8b84814
Remove key generation when given argument is invalid from NotSupported class
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-11-09 11:55:58 +01:00
Przemyslaw Stekiel
997caf835c
Add test class for key generation
...
Genertae test_suite_psa_crypto_generate_key.generated.data.
Use test_suite_psa_crypto_generate_key.function as a test function.
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-11-09 11:55:58 +01:00
Manuel Pégourié-Gonnard
0c81ba7856
Merge pull request #4944 from gilles-peskine-arm/remove-greentea-2.x
...
Backport 2.x: Remove on-target testing
2021-10-29 09:33:26 +02:00
Gilles Peskine
ff30bd0111
Always set a build type for cmake when building for testing
...
Set the build type to Release (-O2) when running CPU-intensive tests (ssl-opt,
or unit tests with debug features). A build type of Check (-Os) would be best
when the main objective of the build is to check for build errors or warnings
and there aren't many tests to run; in this commit there are no such test
cases to change. Only use cmake with no build type (which results in not
passing a -O option, and thus missing some GCC warnings) when exercising cmake
features.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-28 14:28:53 +02:00
Gilles Peskine
31fdda1262
Fix cmake invocation syntax
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-28 14:28:53 +02:00
Gilles Peskine
2531970772
Switch cmake -O2 builds around to where we test a lot
...
Use Release mode (-O2) for component_test_full_cmake_clang which runs SSL
tests.
To have some coverage with Check mode (which enables more compiler warnings
but compiles with -Os), change a few other builds that only run unit tests
at most to Check mode.
Don't add any new builds, to keep the total build volume down. We don't need
extensive coverage of all combinations, just a reasonable set.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-28 14:28:53 +02:00
Gilles Peskine
a0c51fb53e
Clarify a comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-28 14:28:53 +02:00
Gilles Peskine
3daa83e99a
Correct support function name
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-28 14:28:53 +02:00
Gilles Peskine
6fa69864a2
Build with -O2 when running ssl-opt
...
SSL testing benefits from faster executables, so use -O2 rather than -O1.
Some builds use -O1, but that's intended for jobs that only run unit tests,
where the build takes longer than the tests.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-28 14:28:53 +02:00
Manuel Pégourié-Gonnard
d599dc7f1b
Merge pull request #4932 from tom-daubney-arm/all.sh-subshells-2.x
...
Backport 2.x: Run all.sh components in a subshell
2021-10-28 09:33:22 +02:00
Gilles Peskine
a686bf46f7
Merge pull request #5083 from mprse/issue_5065_2x
...
backport 2.x: backport only new test in all.sh from #5072
2021-10-18 17:51:53 +02:00
Przemyslaw Stekiel
7ce979a4f5
all.sh: tests/scripts/all.sh full minus MBEDTLS_CHACHAPOLY_C without PSA_WANT_ALG_GCM and PSA_WANT_ALG_CHACHA20_POLY1305
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-10-18 11:47:32 +02:00
Przemyslaw Stekiel
d6ead7ca84
Address review comments
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com >
2021-10-11 16:39:32 +02:00
Gilles Peskine
8eb3c95590
Add --restore option to clean up but not necessarily run components
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-11 14:29:16 +01:00
Gilles Peskine
6702ce9f73
Documentation improvements
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-11 14:29:16 +01:00
Gilles Peskine
a25c5675e2
Documentation improvement
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-11 14:29:16 +01:00
Gilles Peskine
4fa948feb7
Documentation improvements
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-11 14:29:16 +01:00
Gilles Peskine
8bfe15f291
Disable wildcards when checking for unsupported components
...
Otherwise $COMMAND_LINE_COMPONENTS would try to expand wildcard patterns
based on files in the current directory.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-11 14:29:16 +01:00
Gilles Peskine
76d40fa977
Improve the detection of keep-going commands
...
Have simpler patterns related to 'test' (the central objective being to keep
going if 'make test' or 'tests/...' fails, but not if 'make tests' fails).
Add 'cd' as a can't-keep-going command.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-10-11 14:29:16 +01:00