diff options
author | Timotej Kapus <tk1713@ic.ac.uk> | 2020-03-15 10:28:52 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-04-09 10:18:39 +0100 |
commit | 55f1672a6928c2337bdb5952f049c833e21826c2 (patch) | |
tree | 10fd3da543f8475052de1f8981c481a1bf941916 /test | |
parent | c78b837d24f5df92b758b27e175b079ef2f1fbc0 (diff) | |
download | klee-55f1672a6928c2337bdb5952f049c833e21826c2.tar.gz |
[posix-runtime] Improve model to handle full-path symbolic files
Diffstat (limited to 'test')
-rw-r--r-- | test/Runtime/POSIX/SymFileConsistency.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/Runtime/POSIX/SymFileConsistency.c b/test/Runtime/POSIX/SymFileConsistency.c index 7a28232f..0d4501d6 100644 --- a/test/Runtime/POSIX/SymFileConsistency.c +++ b/test/Runtime/POSIX/SymFileConsistency.c @@ -1,8 +1,7 @@ // REQUIRES: posix-runtime // RUN: %clang %s -emit-llvm %O0opt -c -g -o %t.bc // RUN: rm -rf %t.klee-out-tmp -// RUN: %gentmp %t.klee-out-tmp -// RUN: %klee --run-in-dir=%t.klee-out-tmp --libc=uclibc --posix-runtime --exit-on-error %t.bc --sym-files 1 1 > %t1.log +// RUN: %klee --output-dir=%t.klee-out-tmp --libc=uclibc --posix-runtime --exit-on-error %t.bc --sym-files 1 1 > %t1.log // This test checks that symbolic files can be resolved both with a relatve path // ie. 'A' or by its full path ie. '/full/path/to/cwd/A' @@ -17,10 +16,14 @@ #include <unistd.h> int main(int argc, char **argv) { - struct stat s, s1; + struct stat s, s1, s2; int res = stat("A", &s); char cwd[1024]; getcwd(cwd, 1024); + char *smallest_cwd = malloc(strlen(cwd) + 1); + strcpy(smallest_cwd, cwd); + stat(smallest_cwd, &s2); + free(smallest_cwd); char fullName[1024]; snprintf(fullName, 1024, "%s/%s", cwd, "A"); |