Commit graph

16757 commits

Author SHA1 Message Date
Gilles Peskine
7238503642 Heed --quiet when running make generated_files
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-12 18:19:31 +02:00
Gilles Peskine
88a07457c7 Remove barely-used redirect functions
redirect_out was no longer used and redirect_err was only used to
quiet dd. Change the dd invocation to only print diagnostics on
error (on platforms where this is possible).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-12 18:19:31 +02:00
Gilles Peskine
aca0b32132 Keep going after a shell "[" a.k.a. "test" fails
This is necessary to actually keep going and finish the
component-specific cleanup in component_test_cmake_out_of_source if
ssl-opt.err is non-empty.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-12 18:19:31 +02:00
Gilles Peskine
c2e22ee271 Remove code that is useless now that components run in a subshell
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:49:19 +02:00
Gilles Peskine
b80f0d20ea Complain if an unsupported component is explicitly requested
In all.sh, when an explicit list of components is specified, error out
if one of the components is not known or not supported. Patterns that
happen to match zero components are still effectively ignored.

Fix #2783

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:49:11 +02:00
Gilles Peskine
a681c59d34 Better not function
In the `not` function, in keep-going mode, arrange to report the
failing command (rather than `"$@"`).

Note that the `!` keyword should not be used, because failures with
`!` are not reported properly.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:48:26 +02:00
Gilles Peskine
fec30cbe8c Fix double reporting when the last command of a function fails
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:44:46 +02:00
Gilles Peskine
1f0cdaf3af Stop dispatching through obsolete functions
Remove the obsolete functions record_status and if_build_succeeded.
They didn't affect error detection, but they made error reporting
worse since $BASH_COMMAND would be the unexpanded "$@".

Keep the function definitions for the sake of pull requests using them
that may still be in flight.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:44:36 +02:00
Gilles Peskine
f7e956c85c component_test_cmake_out_of_source: simplify and fix error handling
Remove ssl-opt.err even if it's empty.

Call cat unconditionally: it'll have no visible effect if the file is
empty.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:07:44 +02:00
Gilles Peskine
3664780f98 Detect errors on the left-hand side of a pipeline
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:07:36 +02:00
Gilles Peskine
ce266c48bb Run each component in a subshell and handle errors more robustly
This commit completely rewrites keep-going mode. Instead of relying
solely on "set -e", which has some subtle limitations (such as being
off anywhere inside a conditional), use an ERR trap to record errors.

Run each component in a subshell. This way a component can set
environment variables, change the current directory, etc., without
affecting other components.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 18:07:20 +02:00
Gilles Peskine
5d99682a8c Add --error-test option to test error detection and reporting
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 17:35:19 +02:00
Gilles Peskine
62cf2e8e9f Switch all.sh to bash
This will let us use bash features that are not found in some other sh
implementations, such as DEBUG and ERR traps, "set -o pipefail", etc.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-08 17:35:19 +02:00
Manuel Pégourié-Gonnard
07704c09ce
Merge pull request #4752 from mpg/fix-memleak-in-ssl-test
Fix memory leak on failure path in test code
2021-07-08 12:34:16 +02:00
Gilles Peskine
95d65c773e
Merge pull request #4756 from gilles-peskine-arm/generate_psa_tests-speedup-3.0
Speed up the generation of storage format test cases
2021-07-07 15:27:31 +02:00
Gilles Peskine
45f2a40fa4 Speed up the generation of storage format test cases
Restore the optimization done in
 HEAD^{/Speed up the generation of storage format test cases}
which was lost during refactoring made when adding support for
implicit usage flags.

There are still more than one call to the C compiler, but the extra
calls are only for some key usage test cases.

This is an internal refactoring. This commit does not change the
output of generate_psa_tests.py

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-07-07 12:47:47 +02:00
Dave Rodgman
f2d1199edc
Merge pull request #846 from ARMmbed/mbedtls-3.0.0_merge_into_release
Mbedtls 3.0.0 merge into release
2021-07-07 11:18:30 +01:00
Manuel Pégourié-Gonnard
e5306f6c1d Use distinct variables for distinct purposes
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2021-07-07 10:48:26 +02:00
Dave Rodgman
45419c1ee5 Revert "Add auto-generated files"
This reverts commit 3e84187132.
2021-07-06 20:44:59 +01:00
Dave Rodgman
8a3b232f57 Revert "Add additional generated files"
This reverts commit 2a9c783625.
2021-07-06 20:44:54 +01:00
Dave Rodgman
8df2f8e7b9
Merge pull request #842 from ARMmbed/mbedtls-3.0.0rc0-pr
Mbedtls 3.0.0rc0 pr
2021-07-06 13:00:08 +01:00
Manuel Pégourié-Gonnard
69c10a41c7 Fix memory leak on failure path in test code
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2021-07-06 12:05:23 +02:00
Dave Rodgman
745e3587be Fix Changelog indentation
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-05 18:53:31 +01:00
Dave Rodgman
5b13f60aa3 Fix indentation
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-05 18:09:16 +01:00
Dave Rodgman
16d802ed25 Remove obsolete entry from Changelog
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-05 15:40:35 +01:00
Dave Rodgman
527b82a34c Bump .so version numbers to stay ahead of 2.x
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-02 15:19:38 +01:00
Dave Rodgman
8e5020dead Remove obsolete reference to _ret in migration guide
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-02 12:16:03 +01:00
Dave Rodgman
814b099501 Remove obsolete reference to _ret
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-02 12:11:14 +01:00
Dave Rodgman
83f6a3b02c Remove not-required Changelog entries
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:28:56 +01:00
Dave Rodgman
0703f694b8 Remove warning of development instability from README
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:06:26 +01:00
Dave Rodgman
a84a8eb545 Update changelog to cover #4197
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:01:04 +01:00
Dave Rodgman
0eb215f4a4 Update changelog to cover #4246 and #4158
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:00:38 +01:00
Dave Rodgman
aa6a9b1725 Update changelog to cover #4488
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:00:06 +01:00
Dave Rodgman
9bd038907b Update changelog to cover #4517
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 16:59:49 +01:00
Dave Rodgman
eaef0b78db Update changelog to cover #4720
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 16:59:13 +01:00
Dave Rodgman
2a9c783625 Add additional generated files
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 09:57:20 +01:00
Dave Rodgman
3e84187132 Add auto-generated files
Add files generated by running make generated_files

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 09:45:38 +01:00
Dave Rodgman
1bc9e934e2 Manual updates to version information
This covers a few files that were missed by scripts/bump_version.sh

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 09:26:12 +01:00
Dave Rodgman
7601657418 Bump library version numbers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 23:09:51 +01:00
Dave Rodgman
bb2eece7cf Create aggregated ChangeLog
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 23:09:51 +01:00
Dave Rodgman
b1d1c2af73 Fix filename on Changelog item
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 22:51:28 +01:00
Dave Rodgman
34d8cd2892 Merge remote-tracking branch 'restricted/development-restricted' into mbedtls-3.0.0rc0-pr 2021-06-30 22:51:02 +01:00
Dave Rodgman
bd3bfbf5c2
Merge pull request #4737 from daverodgman/migration-guide 2021-06-30 21:31:53 +01:00
Dave Rodgman
7b743193b0 Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 20:10:10 +01:00
Dave Rodgman
9637bd30a3 Move subsections
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 20:07:57 +01:00
Dave Rodgman
b0e6bb54f9 Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 20:03:55 +01:00
Dave Rodgman
26c12eb523 Remove C from code block
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:58:00 +01:00
Dave Rodgman
10963278e7 Mark all code blocks as C
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
a014831732 Add missing backticks
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
7d2ac88f93 Correct hyperlink
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00