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/getusershell.cc1
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/sl_add.cc26
2 files changed, 27 insertions, 0 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/getusershell.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/getusershell.cc
index c00d75f1121..42ee03fffc0 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/getusershell.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/getusershell.cc
@@ -1,4 +1,5 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: android
// UNSUPPORTED: android
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/sl_add.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/sl_add.cc
new file mode 100644
index 00000000000..4da70c7888f
--- /dev/null
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/sl_add.cc
@@ -0,0 +1,26 @@
+// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+//
+// UNSUPPORTED: linux, darwin, solaris
+
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <stringlist.h>
+
+int main(void) {
+ printf("sl_add\n");
+
+ StringList *sl = sl_init();
+ assert(sl);
+ char *p = strdup("entry");
+ assert(!sl_add(sl, p));
+ char *entry = sl_find(sl, "entry");
+ assert(!strcmp(entry, p));
+ printf("Found '%s'\n", entry);
+ sl_free(sl, 1);
+
+ return 0;
+ // CHECK: sl_add
+ // CHECK: Found '{{.*}}'
+}
OpenPOWER on IntegriCloud