summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Posix
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2017-06-29 00:19:29 +0000
committerVitaly Buka <vitalybuka@google.com>2017-06-29 00:19:29 +0000
commit628643aeb3b82d4bc074e7ecc0a4de13f654a01a (patch)
tree04e66855c50512c0ff53322864cd76e1d9dba0e6 /test/asan/TestCases/Posix
parentaaa18ba4dad3d4e33ad30a34fd9661defc164bb4 (diff)
[asan] Fix try to fix test on Android
%T is dir on host system, device does not have it git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/Posix')
-rw-r--r--test/asan/TestCases/Posix/asan-sigbus.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/asan/TestCases/Posix/asan-sigbus.cpp b/test/asan/TestCases/Posix/asan-sigbus.cpp
index d02ebbd9d..c91ecbd75 100644
--- a/test/asan/TestCases/Posix/asan-sigbus.cpp
+++ b/test/asan/TestCases/Posix/asan-sigbus.cpp
@@ -1,8 +1,8 @@
// Check handle_bus flag
// Defaults to true
// RUN: %clangxx_asan -std=c++11 %s -o %t
-// RUN: not %run %t %T/file 2>&1 | FileCheck %s -check-prefix=CHECK-BUS
-// RUN: %env_asan_opts=handle_sigbus=0 not --crash %run %t %T/file 2>&1 | FileCheck %s
+// RUN: not %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-BUS
+// RUN: %env_asan_opts=handle_sigbus=0 not --crash %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: ios
@@ -12,11 +12,11 @@
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
+#include <string>
char array[4096];
int main(int argc, char **argv) {
- assert(argc > 1);
- int fd = open(argv[1], O_RDWR | O_CREAT, 0700);
+ int fd = open((std::string(argv[0]) + ".m").c_str(), O_RDWR | O_CREAT, 0700);
if (fd < 0) {
perror("open");
exit(1);