[compiler-rt] r328467 - [sanitizer] Make test compatible with Darwin
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 25 18:29:48 PDT 2018
Author: vitalybuka
Date: Sun Mar 25 18:29:48 2018
New Revision: 328467
URL: http://llvm.org/viewvc/llvm-project?rev=328467&view=rev
Log:
[sanitizer] Make test compatible with Darwin
Modified:
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc?rev=328467&r1=328466&r2=328467&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc Sun Mar 25 18:29:48 2018
@@ -2,4 +2,4 @@
#include <unistd.h>
-int main(void) { return access("/root", F_OK); }
+int main(void) { return access("/dev/null", F_OK); }
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc?rev=328467&r1=328466&r2=328467&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc Sun Mar 25 18:29:48 2018
@@ -9,7 +9,7 @@
int main(void) {
struct stat st;
- char name[10];
+ char name[100];
mode_t type;
if (stat("/dev/null", &st))
@@ -17,7 +17,7 @@ int main(void) {
type = S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK;
- if (devname_r(st.st_rdev, type, name, sizeof(name)))
+ if (!devname_r(st.st_rdev, type, name, sizeof(name)))
exit(1);
printf("%s\n", name);
More information about the llvm-commits
mailing list