[compiler-rt] r306621 - [asan] Fix try to fix test on Android
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 17:19:29 PDT 2017
Author: vitalybuka
Date: Wed Jun 28 17:19:29 2017
New Revision: 306621
URL: http://llvm.org/viewvc/llvm-project?rev=306621&view=rev
Log:
[asan] Fix try to fix test on Android
%T is dir on host system, device does not have it
Modified:
compiler-rt/trunk/test/asan/TestCases/Posix/asan-sigbus.cpp
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/asan-sigbus.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan-sigbus.cpp?rev=306621&r1=306620&r2=306621&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan-sigbus.cpp (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan-sigbus.cpp Wed Jun 28 17:19:29 2017
@@ -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);
More information about the llvm-commits
mailing list