Commit graph

6833 commits

Author SHA1 Message Date
Gilles Peskine 227ee24c1f list-symbols.sh: if the build fails, print the build transcript
If "make clean lib" fails in list-symbols.sh, print the transcript
from running make.
2019-05-22 19:07:57 +02:00
Gilles Peskine 017adc7c9c Document "check-names.sh -v" 2019-05-22 19:07:57 +02:00
Gilles Peskine e952fdf2d4 all.sh: invoke check-names.sh in print-trace-on-exit mode 2019-05-15 17:55:22 +02:00
Gilles Peskine ef39c49cd7 Print a command trace if the check-names.sh exits unexpectedly
We've observed that sometimes check-names.sh exits unexpectedly with
status 2 and no error message. The failure is not reproducible. This
commits makes the script print a trace if it exits unexpectedly.
2019-05-15 17:41:27 +02:00
Jaeden Amero 4072bec51e Merge remote-tracking branch 'origin/pr/2563' into mbedtls-2.7
* origin/pr/2563:
  Fix CMake build error on Cygwin and minGW platforms
2019-05-01 09:57:09 +01:00
Jaeden Amero 7f13157b56 Merge remote-tracking branch 'origin/pr/2588' into mbedtls-2.7
* origin/pr/2588:
  Document the scripts behaviour further
  Add --internal option to list-identifiers.sh
2019-04-24 11:22:42 +01:00
Jaeden Amero 555a925663 Merge remote-tracking branch 'origin/pr/2541' into mbedtls-2.7
* origin/pr/2541:
  Add guards for MBEDTLS_X509_CRL_PARSE_C in sample
2019-04-24 11:21:02 +01:00
Jaeden Amero f0aa672e5a Merge remote-tracking branch 'origin/pr/2546' into mbedtls-2.7
* origin/pr/2546: (31 commits)
  Add documentation for why we're catching all exceptions
  Use check_output instead of Popen
  Start unused variable with underscore
  Correct documentation
  Check that the report directory is a directory
  Use namespaces instead of full classes
  Fix pylint issues
  Don't put abi dumps in subfolders
  Add verbose switch to silence all output except the final report
  Fetch the remote crypto branch, rather than cloning it
  Prefix internal functions with underscore
  Add RepoVersion class to make handling of many arguments easier
  Reduce indentation levels
  Improve documentation
  Use optional arguments for setting repositories
  Only build the library
  Add ability to compare submodules from different repositories
  Add handling for cases when not all .so files are present
  Extend functionality to allow setting crypto submodule version
  Simplify logic for checking if report folder can be removed
  ...
2019-04-24 11:19:20 +01:00
Jaeden Amero 2b56a2c945 Merge remote-tracking branch 'origin/pr/2094' into mbedtls-2.7
* origin/pr/2094:
  Adapt ChangeLog
  Add parentheses about parameter of MBEDTLS_X509_ID_FLAG
2019-04-24 11:18:03 +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 d0edbd508b Document the scripts behaviour further 2019-04-18 13:18:40 +01:00
Darryl Green d830fef300 Add --internal option to list-identifiers.sh
When doing ABI/API checking, its useful to have a list of all the
identifiers that are defined in the internal header files, as we
do not promise compatibility for them. This option allows for a
simple method of getting them for use with the ABI checking script.
2019-04-18 12:01:53 +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
Jaeden Amero 2e9f9adcba Merge remote-tracking branch 'origin/pr/2572' into mbedtls-2.7
* origin/pr/2572:
  Clarify comment mangled by an earlier refactoring
  Add an "out-of-box" component
  Run ssl-opt.sh on 32-bit runtime
2019-04-16 15:10:04 +01:00
Jaeden Amero 7f09d88c5e Merge remote-tracking branch 'origin/pr/2556' into mbedtls-2.7
* origin/pr/2556:
  Give credit to OSS-Fuzz for #2404
2019-04-16 15:07:56 +01:00
Jaeden Amero ae29e53f2a Merge remote-tracking branch 'origin/pr/2554' into mbedtls-2.7
* origin/pr/2554:
  Remove ssl_cert_test sample app
2019-04-16 15:07:06 +01:00
Jaeden Amero 440baeb130 Merge remote-tracking branch 'origin/pr/2551' into mbedtls-2.7
* origin/pr/2551:
  Fix the proxy seed in Travis runs
2019-04-16 14:37:56 +01:00
Gilles Peskine 26cae71cbf Clarify comment mangled by an earlier refactoring 2019-04-10 18:49:42 +02:00
Gilles Peskine 1270d32b29 Add an "out-of-box" component
Just run `make` and `make test`. And `selftest` for good measure.
2019-04-10 18:49:42 +02:00
Gilles Peskine 110642993b Run ssl-opt.sh on 32-bit runtime
Run ssl-opt.sh on x86_32 with ASan. This may detect bugs that only
show up on 32-bit platforms, for example due to size_t overflow.

For this component, turn off some memory management features that are
not useful, potentially slow, and may reduce ASan's effectiveness at
catching buffer overflows.
2019-04-10 18:48:36 +02:00
Qixiang Xu 36d2791972 Fix CMake build error on Cygwin and minGW platforms
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
2019-04-10 15:05:20 +01:00