Merge branch 'development-psa-proposed' into development

Resolve conflicts by performing the following.

- Take the upstream Mbed TLS ChangeLog verbatim.
- Reject changes to Makefiles and CMake that are related to using Mbed
  Crypto as a submodule. It doesn't make sense to use Mbed Crypto as a
  submodule of itself.
- Reject README changes, as Mbed Crypto has its own, different README.
- Reject PSA-related changes to config.h. We don't want to disable the
  availability of the PSA Crypto API by default in the Mbed Crypto
  config.h.
- Don't inadvertently revert dead code removal in
  mbedtls_cipher_write_tag() which was added in f2a7529403 ("Fix
  double return statement in cipher.c")
- Where Mbed Crypto already had some MBEDTLS_USE_PSA_CRYPTO code (from
  past companion PRs) take the latest version from Mbed TLS which
  includes integration with MBEDTLS_CHECK_PARAMS.
- Update the version of the shared library files to match what's
  currently present in Mbed TLS.
- Reject removal of testing with PSA from config full tests.
- Resolve conflicts in test tests/suites/helpers.function, where both
  Mbed Crypto and Mbed TLS both added documentation for TEST_ASSERT.
  Combine text from both documentation efforts.
- Reject adding a submodule of ourselves.
- Reject addition of submodule tests in all.sh.
- Reject addition of submodule to library path in
  tests/scripts/run-test-suites.pl.
- Avoid using USE_CRYPTO_SUBMODULE=1 in
  component_test_use_psa_crypto_full_cmake_asan() in all.sh.
This commit is contained in:
Jaeden Amero 2019-02-11 12:05:54 +00:00
commit 67ea2c5e6d
203 changed files with 10220 additions and 2430 deletions

View file

@ -64,7 +64,7 @@ class AbiChecker(object):
)
git_worktree_path = tempfile.mkdtemp()
worktree_process = subprocess.Popen(
[self.git_command, "worktree", "add", git_worktree_path, git_rev],
[self.git_command, "worktree", "add", "--detach", git_worktree_path, git_rev],
cwd=self.repo_path,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
@ -75,6 +75,18 @@ class AbiChecker(object):
raise Exception("Checking out worktree failed, aborting")
return git_worktree_path
def update_git_submodules(self, git_worktree_path):
process = subprocess.Popen(
[self.git_command, "submodule", "update", "--init", '--recursive'],
cwd=git_worktree_path,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
)
output, _ = process.communicate()
self.log.info(output.decode("utf-8"))
if process.returncode != 0:
raise Exception("git submodule update failed, aborting")
def build_shared_libraries(self, git_worktree_path):
my_environment = os.environ.copy()
my_environment["CFLAGS"] = "-g -Og"
@ -131,6 +143,7 @@ class AbiChecker(object):
def get_abi_dump_for_ref(self, git_rev):
git_worktree_path = self.get_clean_worktree_for_git_revision(git_rev)
self.update_git_submodules(git_worktree_path)
self.build_shared_libraries(git_worktree_path)
abi_dumps = self.get_abi_dumps_from_shared_libraries(
git_rev, git_worktree_path