[compiler-rt] r334883 - [asan] Enable fgets_fputs test on Android

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 15 21:01:08 PDT 2018


Author: vitalybuka
Date: Fri Jun 15 21:01:08 2018
New Revision: 334883

URL: http://llvm.org/viewvc/llvm-project?rev=334883&view=rev
Log:
[asan] Enable fgets_fputs test on Android

"echo data" didn't work because %run on android executes test on the device
when lit shell command on the host system.

https://github.com/google/sanitizers/issues/952

Modified:
    compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc?rev=334883&r1=334882&r2=334883&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc Fri Jun 15 21:01:08 2018
@@ -1,9 +1,7 @@
 // RUN: %clangxx_asan -g %s -o %t
-// RUN: echo data > %t-testdata
-// RUN: not %run %t 1 %t-testdata 2>&1 | FileCheck %s --check-prefix=CHECK-FGETS
+// RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK-FGETS
 // RUN: not %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK-FPUTS
 // RUN: not %run %t 3 2>&1 | FileCheck %s --check-prefix=CHECK-PUTS
-// XFAIL: android
 
 #include <assert.h>
 #include <stdio.h>
@@ -39,8 +37,7 @@ int main(int argc, char *argv[]) {
   assert(argc >= 2);
   int testno = argv[1][0] - '0';
   if (testno == 1) {
-    assert(argc == 3);
-    return test_fgets(argv[2]);
+    return test_fgets(argv[0]);
   }
   if (testno == 2)
     return test_fputs();




More information about the llvm-commits mailing list