Remove a check from strerror_r test.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 13 Feb 2014 12:24:10 +0000 (12:24 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 13 Feb 2014 12:24:10 +0000 (12:24 +0000)
It's not always true: on Android, strerror_r with invalid errno
prints "Unknown error ..." to the buffer and returns 0.

This test now only checks that strerror_r does not crash.

llvm-svn: 201321

compiler-rt/lib/asan/lit_tests/TestCases/strerror_r_test.cc

index 0df009b..d91ad33 100644 (file)
@@ -4,10 +4,11 @@
 
 #include <assert.h>
 #include <string.h>
+#include <stdio.h>
 
 int main() {
   char buf[1024];
   char *res = (char *)strerror_r(300, buf, sizeof(buf));
-  assert(res != 0);
+  printf("%p\n", res);
   return 0;
 }