[asan] Fix coverage-android test to avoid name conflict.

And re-enable it.

llvm-svn: 210646
This commit is contained in:
Evgeniy Stepanov 2014-06-11 09:09:09 +00:00
parent 6e8e1abfd5
commit 125a302257
1 changed files with 3 additions and 6 deletions

View File

@ -1,5 +1,5 @@
// Test for direct coverage writing with dlopen.
// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_direct_test_1.so -fPIC
// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSO_DIR=\"%device\" %s -o %t
// RUN: adb shell rm -rf %device/coverage-direct
@ -12,10 +12,7 @@
// RUN: ls; pwd
// RUN: cd %T/coverage-direct/direct
// RUN: %sancov rawunpack *.sancov.raw
// RUN: %sancov print *.sancov
// FIXME: FileCheck disabled due to flakiness in the test. Fix and re-enable.
// ... |& FileCheck %s
// RUN: %sancov print *.sancov |& FileCheck %s
#include <assert.h>
#include <dlfcn.h>
@ -31,7 +28,7 @@ void bar() { printf("bar\n"); }
int main(int argc, char **argv) {
fprintf(stderr, "PID: %d\n", getpid());
void *handle1 =
dlopen(SO_DIR "/libcoverage_direct_test_1.so", RTLD_LAZY);
dlopen(SO_DIR "/libcoverage_android_test_1.so", RTLD_LAZY);
assert(handle1);
void (*bar1)() = (void (*)())dlsym(handle1, "bar");
assert(bar1);