Commit Graph

263 Commits

Author SHA1 Message Date
Hanno Becker
19aa89ad47 Don't set MBEDTLS_MEMORY_DEBUG through scripts/config.pl full 2019-09-09 07:21:40 -04:00
Andrzej Kurek
e1c62e6641 Update documentation of exceptions for config.pl full 2019-09-09 07:12:31 -04:00
Hanno Becker
26c333ac01 Disable memory buffer allocator in full config
This commit modifies `config.pl` to not set MBEDTLS_MEMORY_BUFFER_ALLOC
with the `full` option.
2019-09-09 06:34:30 -04:00
Darryl Green
e3a7c9c081 Change worktree_rev to HEAD for rev-parse
Due to how the checking script is run in docker, worktree_rev is
ambiguous when running rev-parse. We're running it in the checked
out worktree, so we can use HEAD instead, which is unambiguous.
2019-07-25 14:40:00 +01:00
Gilles Peskine
b14b7305c6 Split _abi_compliance_command into smaller functions
This makes the code easier to read and pacifies pylint.
2019-07-05 17:06:42 +02:00
Gilles Peskine
2b3f1346ef Record the commits that were compared
Record the commit ID in addition to the symbolic name of the version
being tested. This makes it easier to figure out what has been
compared when reading logs that don't always indicate explicitly what
things like HEAD are.

This makes the title of HTML reports somewhat verbose, but I think
that's a small price to pay.
2019-07-05 17:06:42 +02:00
Gilles Peskine
cc02658d27 Document how to build the typical argument for -s 2019-07-05 17:06:42 +02:00
Gilles Peskine
16dfdb3539 Allow running /somewhere/else/path/to/abi_check.py
Don't require abi_check.py to be the one in scripts/ under the current
directory.
2019-07-05 17:06:42 +02:00
Jaeden Amero
a33bb945eb windows: Fix Release x64 configuration
Inherit PlatformToolset from the project configuration. This allow the
project to configure PlatformToolset, and aligns the Release x64 build
with other build types.

Fixes #1430
2019-06-20 16:30:35 +01:00
Jaeden Amero
d03977dc3c Merge remote-tracking branch 'origin/pr/2677' into mbedtls-2.7
* origin/pr/2677:
  Show removed symbols in abi check
2019-06-14 08:54:35 +01:00
Darryl Green
db95d7e99d Show removed symbols in abi check 2019-06-05 12:59:07 +01:00
Darryl Green
3e9626ea32 Remove all abi dumps, not just ones shared between versions
While the abi-checking script handled comparing only the modules
that were shared between the old and new versions correctly, the
cleanup of the abi dumps only removed what was shared. Change the
cleanup logic to remove all abi dumps instead.
2019-05-29 13:40:54 +01:00
Darryl Green
8194871075 Only use submodule if present
Enabling the USE_CRYPTO_SUBMODULE option causes problems if the
crypto submodule isn't present. For example, when building
mbed-crypto as a submodule, it should use error.c from the parent
project if USE_CRYPTO_SUBMODULE is set. However if the parent
project isn't present, then the build will fail. Only enable it
if the submodule actually exists.
2019-05-09 13:25:56 +01:00
Darryl Green
62a18e32d0 Add documentation for why we're catching all exceptions
We wish to distinguish between success, an abi break and a script
failure, so catch all uncaught exceptions and exit explicitly
with status 2
2019-04-18 16:25:56 +01:00
Darryl Green
4a483e4829 Use check_output instead of Popen 2019-04-18 11:51:49 +01:00
Darryl Green
31a1e99874 Start unused variable with underscore 2019-04-18 11:51:49 +01:00
Darryl Green
bbc6ccfa2f Correct documentation 2019-04-18 11:51:49 +01:00
Darryl Green
03625fe311 Check that the report directory is a directory 2019-04-18 11:51:49 +01:00
Darryl Green
f1d272d0ca Use namespaces instead of full classes 2019-04-18 11:51:49 +01:00
Darryl Green
b7447e7d2a Fix pylint issues 2019-04-18 11:51:49 +01:00
Darryl Green
cf43425941 Don't put abi dumps in subfolders 2019-04-18 11:51:49 +01:00
Darryl Green
f0f9f7fe7d Add verbose switch to silence all output except the final report 2019-04-18 11:51:49 +01:00
Darryl Green
b743309c00 Fetch the remote crypto branch, rather than cloning it 2019-04-18 11:51:49 +01:00
Darryl Green
7bb9cb5ce3 Prefix internal functions with underscore 2019-04-18 11:51:49 +01:00
Darryl Green
02b6865dc7 Add RepoVersion class to make handling of many arguments easier
There are a number of arguments being passed around, nearly all of
which are duplicated between the old and new versions. Moving these
into a separate class should hopefully make it simpler to follow
what is being done.
2019-04-18 11:51:49 +01:00
Darryl Green
7be79c9e77 Reduce indentation levels 2019-04-18 11:51:49 +01:00
Darryl Green
765d20d3d8 Improve documentation 2019-04-18 11:51:49 +01:00
Darryl Green
826e5af85d Use optional arguments for setting repositories 2019-04-18 11:51:49 +01:00
Darryl Green
997c287ce9 Only build the library
We only need the .so files, so only build the library
2019-04-18 11:51:49 +01:00
Darryl Green
87aedf6202 Add ability to compare submodules from different repositories
As before with wanting to compare revisions across different
repositories, the ability to select the crypto submodule from a
different repository is useful.
2019-04-18 11:51:49 +01:00
Darryl Green
d98d8b50dc Add handling for cases when not all .so files are present
We may wish to compare ABI/API between Mbed TLS and Mbed Crypto,
which will cause issues as not all .so files are shared. Only
compare .so files which both libraries have.
2019-04-18 11:51:49 +01:00
Darryl Green
d9ad9ec81c Extend functionality to allow setting crypto submodule version
As going forward we will have Crypto in a submodule, we will need to
be able to check ABI compatibility between versions using different
submodule versions. For TLS versions that support the submodule, we
will always build using the submodule.

If the Crypto submodule is used, libmbedcrypto.so is not in the main
library folder, but in crypto/library instead. Given this, the script
searches for *.so files and notes their path, in order to create the
dumps correctly.
2019-04-18 11:51:49 +01:00
Darryl Green
ab3893b815 Simplify logic for checking if report folder can be removed 2019-04-18 11:51:49 +01:00
Darryl Green
32e7a50c82 Add option for a brief report of problems only 2019-04-18 11:51:49 +01:00
Darryl Green
d3cde6f2d3 Add option to skip identifiers in ABI checks
By default abi-compliance-checker will check the entire ABI/API.
There are internal identifiers that we do not promise compatibility
for, so we want the ability to skip them when checking the ABI/API.
2019-04-18 11:51:49 +01:00
Darryl Green
834ebc415c Extend abi-checking to different repos 2019-04-18 11:51:49 +01:00
Gilles Peskine
fceb4ce767 abi_check.py: Document more methods 2019-04-18 11:51:38 +01:00
Jaeden Amero
346f9595c9 abi_check: Update submodules
When grabbing a fresh copy of a branch, it's required to also fetch the
submodule. Add fetching the submodule to abi_check.py.
2019-04-18 11:40:21 +01:00
Jaeden Amero
5857c2f43f abi_check: Allow checking current checkout
Without a "--detach" option, git worktree will refuse to checkout a branch
that's already checked out. This makes the abi_check.py script not very
useful for checking the currently checked out branch, as git will error
that the branch is already checked out. Add the "--detach" option to check
out the new temporary worktree in detached head mode. This is acceptable
because we aren't planning on working on the branch and just want a
checkout to do ABI checking from.
2019-04-18 11:40:21 +01:00
Darryl Green
31321ca893 Fix minor issues with command line options 2019-04-18 11:40:21 +01:00
Darryl Green
4cd7a9b8ed Updated abi_check.py docstrings 2019-04-18 11:40:21 +01:00
Darryl Green
c47ac2651a Fix current directory check 2019-04-18 11:40:21 +01:00
Darryl Green
e3e6b18351 Add copyright to abi_check script 2019-04-18 11:40:21 +01:00
Darryl Green
3da1504229 Add script for ABI compatibility checking 2019-04-18 11:40:21 +01:00
Andres Amaya Garcia
21ade06ef8 Reduce priority of 3DES ciphersuites 2019-02-13 09:52:46 +00:00
Simon Butcher
f15cfd5d04 Merge remote-tracking branch 'public/pr/1557' into mbedtls-2.7 2018-06-27 11:07:50 +01:00
Simon Butcher
e83b1ae201 Merge remote-tracking branch 'public/pr/1606' into mbedtls-2.7 2018-06-01 19:34:44 +01:00
Jaeden Amero
11d5551d0a Merge remote-tracking branch 'upstream-public/pr/1487' into mbedtls-2.7-proposed 2018-05-04 11:06:21 +01:00
Andres AG
430e68c4b7 Remove refs to VS6 from generate_visualc_files.pl 2018-05-01 21:01:20 +01:00
Andres Amaya Garcia
464b1491c2 genereate_visualc_files.pl deletes old files
Add a function that deletes all the old Visual Studio prokect files
before generating the new ones. This ensure that project files for
delete example applications are removed from the repository.
2018-05-01 21:01:16 +01:00