Gilles Peskine
adc07aa708
Merge pull request #6696 from gilles-peskine-arm/fuzz-cflags-2.28
...
Backport 2.28: programs/fuzz: set sensible default CFLAGS
2022-12-15 19:47:28 +01:00
Gilles Peskine
4b3806eb46
Merge pull request #6688 from gilles-peskine-arm/generate_test_code-function_comments-2.28
...
Backport 2.28: Allow comments in test function prototypes
2022-12-15 12:32:07 +01:00
Manuel Pégourié-Gonnard
4a9fa30211
Merge pull request #6782 from gilles-peskine-arm/lcov-script-2.28
...
Backport 2.28: lcov script
2022-12-15 12:29:30 +01:00
Dave Rodgman
4547eae341
Merge pull request #984 from Mbed-TLS/mbedtls-2.28.2-merge-back
...
Mbedtls 2.28.2 merge back
2022-12-14 17:51:58 +00:00
Manuel Pégourié-Gonnard
a0a903fa3c
Merge pull request #6775 from gilles-peskine-arm/document-deprecation-process-2.28
...
Backport 2.28: Document deprecation process 2.28
2022-12-14 10:57:06 +01:00
Manuel Pégourié-Gonnard
8605571767
Merge pull request #6783 from davidhorstmann-arm/move-mbedtls-deprecated-prefix
...
2.28 only: Move `MBEDTLS_DEPRECATED` annotation to prefix
2022-12-14 10:09:05 +01:00
David Horstmann
9c021229bf
Move MBEDTLS_DEPRECATED annotation to prefix
...
Refactor the MBEDTLS_DEPRECATED macro to be in front of the function
name rather than on its own line after the function arguments.
If it is placed on its own line, Uncrustify moves it to the start of
the line which causes check_names.py to think it is an identifier.
As a result check_names.py doesn't treat it as a macro name and it
gets detected as a typo.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-13 17:56:12 +00:00
Gilles Peskine
eaac1afcf1
Remove obsolete target covtest
...
This target dates back from before basic-build-test.sh existed. Refer to
that script instead.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
141b551df6
No need for -g or -O in LDFLAGS
...
Fix a mistake in the previous commit.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
bb3d31659b
You need --coverage when linking as well
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
26aae47042
Add option to reset the traces, to use after rework
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
f11c33c27c
Put temporary files in a temporary directory
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
b0f11f1429
Fix "make lcov" in CMake out-of-tree builds
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
a5bff8f17e
Call the new lcov script from CMake builds
...
The code in CMakeLists.txt was an old copy of the code in Makefile. This
brings in branch coverage, which had only been added to Makefile.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
862e4a3f8d
Add a bit of documentation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
Gilles Peskine
7f4705d8d4
Move lcov commands to a separate script
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-13 18:44:14 +01:00
David Horstmann
d1e13e0de7
Minor grammatical fix
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-13 10:36:02 +01:00
David Horstmann
c9dcb4e83e
Merge and reorder paragraphs for clarity
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-13 10:36:01 +01:00
David Horstmann
bbe8f66bb4
Reword the documentation for deprecation
...
Change the wording of the section of CONTRIBUTING.md on function
deprecation to make it easier to understand.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-13 10:36:00 +01:00
Manuel Pégourié-Gonnard
97ead79cd7
Merge pull request #6204 from wernerlewis/ecp_group_test_2.28
...
[Backport 2.28] Add test for ECP group metadata
2022-12-13 09:29:40 +01:00
Manuel Pégourié-Gonnard
1d1baa7fc3
Merge pull request #6586 from lpy4105/2.28-check-psa-name-typo
...
Backport 2.28: check_names: extend typo check to PSA macro/enum names
2022-12-13 09:24:56 +01:00
Dave Rodgman
a5edd2b553
Merge pull request #6762 from ZachFleck42/2.28-backport
...
Backport 2.28: Fix typo in `library/entropy.c`
2022-12-12 16:31:00 +00:00
Dave Rodgman
89f040a5c9
Merge pull request #978 from Mbed-TLS/mbedtls-2.28.2rc0-pr
...
Mbedtls 2.28.2rc0 pr [DO NOT MERGE]
2022-12-12 15:17:36 +00:00
Manuel Pégourié-Gonnard
08f7f0d1f6
Merge pull request #6744 from gilles-peskine-arm/windows-different-drives-build-error-2.28
...
Backport 2.28: Copy files instead of hard-linking on Windows
2022-12-12 11:59:06 +01:00
Manuel Pégourié-Gonnard
df86cef899
Merge pull request #6693 from mpg/optimize-with-asan-2.28
...
[backport 2.28] Optimize with asan
2022-12-12 11:58:21 +01:00
Zachary Fleckenstein
4364fc94c1
Fix typo in library/entropy.c
...
Signed-off-by: Zachary Fleckenstein <ZachFleck42@Gmail.com>
2022-12-09 09:26:42 -05:00
Aditya Deshpande
d6f774f63f
Fix ChangeLog
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2022-12-09 12:53:04 +00:00
Aditya Deshpande
1aa138a9e5
Update BRANCHES.md so that it links to the LTS release tag on GitHub.
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2022-12-09 10:41:46 +00:00
aditya-deshpande-arm
bf864160a9
Fix ChangeLog Formatting
...
Co-authored-by: Dave Rodgman <dave.rodgman@arm.com>
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2022-12-09 10:38:40 +00:00
Manuel Pégourié-Gonnard
0e0793f4ac
Merge pull request #6706 from davidhorstmann-arm/2.28-code-style-script-non-corrected
...
[Backport 2.28] Add code style correction script
2022-12-09 09:41:27 +01:00
Gilles Peskine
9f54092a01
Avoid unstructured macro usage with code duplication
...
Instead of
```
#if CONDITION
for(XXX)
for(YYY)
#else
for(XXX)
for(YYY)
#endif
BODY
```
duplicate the BODY code. This isn't ideal, but we can live with it.
The compelling reason to restructure the code is that this entanglement
of C preprocessor syntax with C grammar syntax confuses uncrustify.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-08 21:50:34 +01:00
David Horstmann
eead72ec9e
Reindent line continuations for pylint
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
c747fdfe1f
Fixup: Config file name in code style script
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
1f8b4d9c6b
Add spaces around '+'
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
4f51601292
Remove legacy comments from config
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
9008128491
Improvements to the top of the code style config
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
6ec778f727
Rename Uncrustify configuration
...
Make it more obvious that this is an Uncrustify configuration file.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
c543870882
Explain that the script is only for the future
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
f47e657fe6
Remove ChangeLog entry, style is not yet official
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
3a6f9f9921
Use constant for supported Uncrustify version
...
Define and report the supported Uncrustify version (and remove extra
newlines from version output).
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
99a669a50d
Fix typo in code style script
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
448cfec2a5
Use helper function for error printing
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
27b3704eef
Miscellaneous improvements to code style script
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 17:47:10 +00:00
David Horstmann
29cf15dfbc
Improve CMake backward compatibility
...
Use code with clear behavior in CMake 2.8.12 (which we try to support in
Mbed TLS 2.28, although that's mostly for the sake of RHEL, not Windows).
The code in the previous commit relied on features introduced in CMake 3.x,
although it worked as desired by accident because `LIST_DIRECTORIES false`
was effectively ignored and `configure_file` on a directory had no
harmful effect.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 12:16:59 +01:00
Aditya Deshpande
7428c61df2
Bump LTS version to 2.28.2
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2022-12-08 11:05:11 +00:00
Aditya Deshpande
a26938aec6
Assemble ChangeLog
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2022-12-08 11:04:16 +00:00
Aditya Deshpande
dbefba7b5c
Merge branch 'mbedtls-2.28-restricted' into mbedtls-2.28.2rc0-pr
2022-12-08 10:57:08 +00:00
David Horstmann
e09c476eb6
Add all.sh component to test with code style
...
Run the main test suites after running code style correction to check
that code style correction does not break these tests.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-12-08 10:09:03 +00:00
Dominik Gschwind
b0423a260c
Copy files instead of hard-linking on Windows
...
Fixes an issue on Windows where when source and build directory are on different drives hard-linking
to files or directory fails as it doesn't work across filesystem boundaries. Note that symlinking is also
not possible because it requires administrator privileges on Windows.
The solution copies the files using the built-in cmake `configure_file(src dest COPYONLY)` command.
As this command only operates on files, if a directory is specified the files will be globbed recursively
and through symlinks.
Signed-off-by: Dominik Gschwind <dominik.gschwind99@gmail.com>
2022-12-07 19:34:52 +01:00
Dave Rodgman
5c581dd602
Merge pull request #6735 from daverodgman/fix_test_dep_spelling_2.28
...
Backport 2.28: Fix spelling of test dependency
2022-12-07 09:06:39 +00:00