summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/sanitizer_common')
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/access.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/access.cc)0
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/devname.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/devname.cc)1
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/devname_r.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/devname_r.cc)3
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/fgetln.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/fgetln.cc)1
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc8
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/lstat.cc)0
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/strlcat.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/strlcat.cc)2
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/strlcpy.cc (renamed from compiler-rt/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc)2
-rw-r--r--compiler-rt/test/sanitizer_common/lit.common.cfg2
9 files changed, 16 insertions, 3 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/access.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/access.cc
index 92c2a9fd847..92c2a9fd847 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/access.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/access.cc
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/devname.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/devname.cc
index 8cde9eb3c4b..da4bb8853a1 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/devname.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/devname.cc
@@ -1,4 +1,5 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: linux, solaris
#include <stdio.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/devname_r.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/devname_r.cc
index ef65dfd9322..f7925f55597 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/devname_r.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/devname_r.cc
@@ -1,4 +1,5 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: linux, solaris
#include <sys/cdefs.h>
#include <sys/stat.h>
@@ -16,7 +17,7 @@ int main(void) {
type = S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK;
- if (devname_r(st.st_rdev, type, name, __arraycount(name)))
+ if (devname_r(st.st_rdev, type, name, sizeof(name)))
exit(1);
printf("%s\n", name);
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/fgetln.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/fgetln.cc
index 2c4f83d4652..e98cf449a27 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/fgetln.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/fgetln.cc
@@ -1,4 +1,5 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t
+// UNSUPPORTED: linux
#include <stdio.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc
index b91a3d7d526..bf198eff91d 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc
@@ -5,13 +5,19 @@
#include <assert.h>
#include <stdio.h>
-#include <unistd.h>
#include <string.h>
#if __linux__
#include <pty.h>
+#elif defined(__FreeBSD__)
+#include <libutil.h>
+#include <pwd.h>
+#include <sys/ioctl.h>
+#include <sys/termios.h>
+#include <sys/types.h>
#else
#include <util.h>
#endif
+#include <unistd.h>
int
main (int argc, char** argv)
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/lstat.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cc
index 37237d82102..37237d82102 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/lstat.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cc
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/strlcat.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/strlcat.cc
index ea504589e3e..bdabada76aa 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/strlcat.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/strlcat.cc
@@ -1,5 +1,7 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t
+// UNSUPPORTED: linux
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/strlcpy.cc
index 99634860273..83053911d96 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/strlcpy.cc
@@ -1,5 +1,7 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t
+// UNSUPPORTED: linux
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg b/compiler-rt/test/sanitizer_common/lit.common.cfg
index 72e3e5e1085..0e9183b1bdd 100644
--- a/compiler-rt/test/sanitizer_common/lit.common.cfg
+++ b/compiler-rt/test/sanitizer_common/lit.common.cfg
@@ -59,5 +59,5 @@ config.substitutions.append( ('%env_tool_opts=',
config.suffixes = ['.c', '.cc', '.cpp']
-if config.host_os not in ['Linux', 'Darwin', 'NetBSD']:
+if config.host_os not in ['Linux', 'Darwin', 'NetBSD', 'FreeBSD']:
config.unsupported = True
OpenPOWER on IntegriCloud