From c5d1e302e8b538bf06eeee084a5537f59d2c1284 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Fri, 14 Feb 2014 15:12:52 +0100 Subject: Replace fprintf with klee_warnings for POSIX lib --- runtime/POSIX/fd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/POSIX/fd.c b/runtime/POSIX/fd.c index 1c75cd76..24b248e3 100644 --- a/runtime/POSIX/fd.c +++ b/runtime/POSIX/fd.c @@ -157,7 +157,7 @@ int __fd_open(const char *pathname, int flags, mode_t mode) { if ((flags & O_TRUNC) && (flags & O_RDONLY)) { /* The result of using O_TRUNC with O_RDONLY is undefined, so we return error */ - fprintf(stderr, "Undefined call to open(): O_TRUNC | O_RDONLY\n"); + klee_warning("Undefined call to open(): O_TRUNC | O_RDONLY\n"); errno = EACCES; return -1; } @@ -165,7 +165,7 @@ int __fd_open(const char *pathname, int flags, mode_t mode) { if ((flags & O_EXCL) && !(flags & O_CREAT)) { /* The result of using O_EXCL without O_CREAT is undefined, so we return error */ - fprintf(stderr, "Undefined call to open(): O_EXCL w/o O_RDONLY\n"); + klee_warning("Undefined call to open(): O_EXCL w/o O_RDONLY\n"); errno = EACCES; return -1; } @@ -461,7 +461,7 @@ ssize_t write(int fd, const void *buf, size_t count) { memcpy(f->dfile->contents + f->off, buf, actual_count); if (count != actual_count) - fprintf(stderr, "WARNING: write() ignores bytes.\n"); + klee_warning("write() ignores bytes.\n"); if (f->dfile == __exe_fs.sym_stdout) __exe_fs.stdout_writes += actual_count; -- cgit 1.4.1 From a04f2277f90dc2aac3a3277c9dd7c6d3378059e4 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Sun, 14 Sep 2014 21:47:34 +0200 Subject: Enable test case again --- test/Runtime/POSIX/Write2.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/Runtime/POSIX/Write2.c b/test/Runtime/POSIX/Write2.c index 97d501f6..edb3e5b2 100644 --- a/test/Runtime/POSIX/Write2.c +++ b/test/Runtime/POSIX/Write2.c @@ -1,12 +1,6 @@ // RUN: %llvmgcc %s -emit-llvm -O0 -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 -// -// Disable this test on LLVM 3.4 for now, it seems to hang indefinitely when run -// in our Travis CI config. -// -// FIXME: Investigate. -// REQUIRES: not-llvm-3.4 #include #include -- cgit 1.4.1