Skip to content

Commit 2af2fd5

Browse files
committed
[asan] Fix try to fix test on Android
%T is dir on host system, device does not have it llvm-svn: 306621
1 parent 0c981cf commit 2af2fd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/test/asan/TestCases/Posix/asan-sigbus.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Check handle_bus flag
22
// Defaults to true
33
// RUN: %clangxx_asan -std=c++11 %s -o %t
4-
// RUN: not %run %t %T/file 2>&1 | FileCheck %s -check-prefix=CHECK-BUS
5-
// RUN: %env_asan_opts=handle_sigbus=0 not --crash %run %t %T/file 2>&1 | FileCheck %s
4+
// RUN: not %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-BUS
5+
// RUN: %env_asan_opts=handle_sigbus=0 not --crash %run %t 2>&1 | FileCheck %s
66

77
// UNSUPPORTED: ios
88

@@ -12,11 +12,11 @@
1212
#include <stdlib.h>
1313
#include <sys/mman.h>
1414
#include <unistd.h>
15+
#include <string>
1516

1617
char array[4096];
1718
int main(int argc, char **argv) {
18-
assert(argc > 1);
19-
int fd = open(argv[1], O_RDWR | O_CREAT, 0700);
19+
int fd = open((std::string(argv[0]) + ".m").c_str(), O_RDWR | O_CREAT, 0700);
2020
if (fd < 0) {
2121
perror("open");
2222
exit(1);

0 commit comments

Comments
 (0)