diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-09-18 20:31:57 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-09-18 20:31:57 +0000 |
commit | eca49ebb092bd846aed33508b613f3c582ef8587 (patch) | |
tree | b51174b0357a400462139fb4b888d486640cf93a /test/scudo | |
parent | 3a6c8910afe0594078e93a62d1d2aa1504d8e925 (diff) |
[scudo] Additional modifications for Android tests support
Summary:
With the recent move of `android_commands` to `sanitizer_common`, some things
have to be updated with regard to Scudo on Android.
Notably:
- `config.android` is dealt with in the common code
- `config.compile_wrapper` can be prepended to allow for the use of the android
commands
- `SCUDO_OPTIONS` must be passed with the environment when running a test
- `preinit.cpp` fails with some API levels, not sure why, I will have to dig
into this later.
Note that `check-scudo` is not enabled yet in the bots. It's all local testing
for now until everything looks good.
Reviewers: alekseyshl, vitalybuka
Reviewed By: vitalybuka
Subscribers: srhines, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D37990
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/scudo')
-rw-r--r-- | test/scudo/lit.cfg | 2 | ||||
-rw-r--r-- | test/scudo/lit.site.cfg.in | 1 | ||||
-rw-r--r-- | test/scudo/preinit.cpp | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/test/scudo/lit.cfg b/test/scudo/lit.cfg index d0a4cb167..bd9e6aa31 100644 --- a/test/scudo/lit.cfg +++ b/test/scudo/lit.cfg @@ -32,7 +32,7 @@ if not config.android: c_flags += ["-lrt"] def build_invocation(compile_flags): - return " " + " ".join([config.clang] + compile_flags) + " " + return " " + " ".join([config.compile_wrapper, config.clang] + compile_flags) + " " # Add clang substitutions. config.substitutions.append(("%clang_scudo ", diff --git a/test/scudo/lit.site.cfg.in b/test/scudo/lit.site.cfg.in index be0d88c10..429951875 100644 --- a/test/scudo/lit.site.cfg.in +++ b/test/scudo/lit.site.cfg.in @@ -3,7 +3,6 @@ config.name_suffix = "@SCUDO_TEST_CONFIG_SUFFIX@" config.target_arch = "@SCUDO_TEST_TARGET_ARCH@" config.target_cflags = "@SCUDO_TEST_TARGET_CFLAGS@" -config.android = "@ANDROID@" # Load common config for all compiler-rt lit tests. lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured") diff --git a/test/scudo/preinit.cpp b/test/scudo/preinit.cpp index b8c01a401..f904c6c2d 100644 --- a/test/scudo/preinit.cpp +++ b/test/scudo/preinit.cpp @@ -4,6 +4,10 @@ // Verifies that calling malloc in a preinit_array function succeeds, and that // the resulting pointer can be freed at program termination. +// On some Android versions, calling mmap() from a preinit function segfaults. +// It looks like __mmap2.S ends up calling a NULL function pointer. +// UNSUPPORTED: android + #include <assert.h> #include <stdlib.h> #include <string.h> |