about summary refs log tree commit diff homepage
path: root/test/Runtime/POSIX
diff options
context:
space:
mode:
Diffstat (limited to 'test/Runtime/POSIX')
-rw-r--r--test/Runtime/POSIX/FDNumbers.c4
-rw-r--r--test/Runtime/POSIX/Fcntl.c2
-rw-r--r--test/Runtime/POSIX/FreeArgv.c3
-rw-r--r--test/Runtime/POSIX/Getenv.c5
-rw-r--r--test/Runtime/POSIX/Openat.c3
-rw-r--r--test/Runtime/POSIX/Replay.c1
-rw-r--r--test/Runtime/POSIX/Stdin.c7
-rw-r--r--test/Runtime/POSIX/Write1.c4
-rw-r--r--test/Runtime/POSIX/Write2.c4
9 files changed, 20 insertions, 13 deletions
diff --git a/test/Runtime/POSIX/FDNumbers.c b/test/Runtime/POSIX/FDNumbers.c
index 42f0f5ae..4e0fa79a 100644
--- a/test/Runtime/POSIX/FDNumbers.c
+++ b/test/Runtime/POSIX/FDNumbers.c
@@ -1,10 +1,10 @@
 // RUN: %clang %s -emit-llvm %O0opt -c -o %t2.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --posix-runtime --exit-on-error %t2.bc --sym-files 1 10
-
 #include <assert.h>
-#include <fcntl.h>
 #include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
 
 int main(int argc, char **argv) {
   int fd = open("A", O_TRUNC);
diff --git a/test/Runtime/POSIX/Fcntl.c b/test/Runtime/POSIX/Fcntl.c
index 53246a15..737d5da5 100644
--- a/test/Runtime/POSIX/Fcntl.c
+++ b/test/Runtime/POSIX/Fcntl.c
@@ -1,7 +1,7 @@
 // RUN: %clang %s -emit-llvm %O0opt -c -o %t2.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --posix-runtime --exit-on-error %t2.bc --sym-files 1 10
-
+#include "klee/klee.h"
 #include <assert.h>
 #include <fcntl.h>
 
diff --git a/test/Runtime/POSIX/FreeArgv.c b/test/Runtime/POSIX/FreeArgv.c
index 93ed697e..cdc5487f 100644
--- a/test/Runtime/POSIX/FreeArgv.c
+++ b/test/Runtime/POSIX/FreeArgv.c
@@ -4,7 +4,8 @@
 // RUN: test -f %t.klee-out/test000001.free.err
 // RUN: test -f %t.klee-out/test000002.free.err
 // RUN: test -f %t.klee-out/test000003.free.err
-
+#include "klee/klee.h"
+#include <stdlib.h>
 int main(int argc, char **argv) {
   switch (klee_range(0, 3, "range")) {
   case 0:
diff --git a/test/Runtime/POSIX/Getenv.c b/test/Runtime/POSIX/Getenv.c
index 6dff3c24..d5db7c39 100644
--- a/test/Runtime/POSIX/Getenv.c
+++ b/test/Runtime/POSIX/Getenv.c
@@ -1,9 +1,10 @@
 // RUN: %clang %s -emit-llvm %O0opt -c -o %t2.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --libc=klee --posix-runtime --exit-on-error %t2.bc --sym-files 1 10
-
 #include <assert.h>
-
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 int main(int argc, char **argv) {
   char *g = getenv("PWD");
   if (g) {
diff --git a/test/Runtime/POSIX/Openat.c b/test/Runtime/POSIX/Openat.c
index 2341527e..67ff78bd 100644
--- a/test/Runtime/POSIX/Openat.c
+++ b/test/Runtime/POSIX/Openat.c
@@ -2,9 +2,10 @@
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --posix-runtime --exit-on-error %t2.bc --sym-files 1 10
 // RUN: test -f %t.klee-out/test000001.ktest
-
+#include "klee/klee.h"
 #include <assert.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 int main(int argc, char **argv) {
   int fd = openat(AT_FDCWD, "A", O_RDWR|O_TRUNC);
diff --git a/test/Runtime/POSIX/Replay.c b/test/Runtime/POSIX/Replay.c
index 61862c5f..fb1b400c 100644
--- a/test/Runtime/POSIX/Replay.c
+++ b/test/Runtime/POSIX/Replay.c
@@ -8,6 +8,7 @@
 // REPLAY: Yes
 
 #ifdef KLEE_EXECUTION
+#include "klee/klee.h"
 #define EXIT klee_silent_exit
 #else
 #include <stdlib.h>
diff --git a/test/Runtime/POSIX/Stdin.c b/test/Runtime/POSIX/Stdin.c
index 6d84baff..84caab3a 100644
--- a/test/Runtime/POSIX/Stdin.c
+++ b/test/Runtime/POSIX/Stdin.c
@@ -9,11 +9,12 @@
 // RUN: grep "mode:lnk" %t.log
 // RUN: grep "read:sym:yes" %t.log
 // RUN: grep "read:sym:no" %t.log
-
-#include <stdio.h>
+#include <assert.h>
 #include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
 #include <sys/stat.h>
-#include <assert.h>
+#include <unistd.h>
 
 int main(int argc, char **argv) {
   struct stat stats;
diff --git a/test/Runtime/POSIX/Write1.c b/test/Runtime/POSIX/Write1.c
index 5fc4ff8f..7f1e6f20 100644
--- a/test/Runtime/POSIX/Write1.c
+++ b/test/Runtime/POSIX/Write1.c
@@ -2,8 +2,10 @@
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --exit-on-error --libc=uclibc --posix-runtime %t.bc --sym-files 1 10 --sym-stdout 2>%t.log
 
-#include <stdio.h>
+#include "klee/klee.h"
 #include <assert.h>
+#include <stdio.h>
+#include <string.h>
 
 int main(int argc, char** argv) {
   char buf[32];
diff --git a/test/Runtime/POSIX/Write2.c b/test/Runtime/POSIX/Write2.c
index 04698f21..e9eb6f6b 100644
--- a/test/Runtime/POSIX/Write2.c
+++ b/test/Runtime/POSIX/Write2.c
@@ -1,9 +1,9 @@
 // RUN: %clang %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --exit-on-error --libc=uclibc --posix-runtime %t.bc --sym-files 1 10 --sym-stdout 2>%t.log
-
-#include <stdio.h>
+#include "klee/klee.h"
 #include <assert.h>
+#include <stdio.h>
 
 int main(int argc, char** argv) {
   const char* msg = "This will eventually overflow stdout. ";