about summary refs log tree commit diff homepage
path: root/test/regression
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2014-09-12 17:03:35 -0700
committerDaniel Dunbar <daniel@zuster.org>2014-09-12 17:39:18 -0700
commit9b715dfc40311247b08daf5fa8695a95fd66106f (patch)
treee45588fba94a530653d8b6bcddafc5cda3e2adef /test/regression
parent9a3cf72b8979213bcc6d235856bb0ddba4ee37c8 (diff)
downloadklee-9b715dfc40311247b08daf5fa8695a95fd66106f.tar.gz
[tests] Set --output-dir on all test runs, in support of running tests in parallel.
 - It would be nice if there was an easier way to do this that didn't involve
   editing all of the tests (like running each test in its own directory), but
   this approach fixes #146 and doesn't involve changing 'lit' or writing a
   wrapper harness. My assumption is a lot of tests start are derived from
   another one, so hopefully following this convention won't be burdensome, and
   I updated 'make check' so that it will produce an error if any test runs klee
   without --output-dir (by checking for the existing of klee-last files).

 - This also helps with #147 but I still can't fully run tests in parallel (I
   start hitting STP errors).
Diffstat (limited to 'test/regression')
-rw-r--r--test/regression/2007-07-25-invalid-stp-array-binding-to-objectstate.c3
-rw-r--r--test/regression/2007-07-30-unflushed-byte.c3
-rw-r--r--test/regression/2007-08-01-bool-zext-in-call.ll12
-rw-r--r--test/regression/2007-08-01-cache-unclear-on-overwrite-flushed.c3
-rw-r--r--test/regression/2007-08-06-64bit-shift.c3
-rw-r--r--test/regression/2007-08-06-access-after-free.c3
-rw-r--r--test/regression/2007-08-08-free-zero.c5
-rw-r--r--test/regression/2007-08-16-invalid-constant-value.c3
-rw-r--r--test/regression/2007-08-16-valid-write-to-freed-object.c3
-rw-r--r--test/regression/2007-10-11-free-of-alloca.c7
-rw-r--r--test/regression/2007-10-11-illegal-access-after-free-and-branch.c7
-rw-r--r--test/regression/2007-10-12-failed-make-symbolic-after-copy.c5
-rw-r--r--test/regression/2008-03-04-free-of-global.c7
-rw-r--r--test/regression/2008-03-11-free-of-malloc-zero.c3
-rw-r--r--test/regression/2008-04-10-bad-alloca-free.c3
-rw-r--r--test/regression/2008-05-23-gep-with-global-const.c3
-rw-r--r--test/regression/2012-05-13-asm-causes-aborts.c3
-rw-r--r--test/regression/2014-07-04-unflushed-error-report.c7
18 files changed, 47 insertions, 36 deletions
diff --git a/test/regression/2007-07-25-invalid-stp-array-binding-to-objectstate.c b/test/regression/2007-07-25-invalid-stp-array-binding-to-objectstate.c
index ad585ddd..611656bd 100644
--- a/test/regression/2007-07-25-invalid-stp-array-binding-to-objectstate.c
+++ b/test/regression/2007-07-25-invalid-stp-array-binding-to-objectstate.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 #include <assert.h>
 
diff --git a/test/regression/2007-07-30-unflushed-byte.c b/test/regression/2007-07-30-unflushed-byte.c
index ba8a08a7..20f60eef 100644
--- a/test/regression/2007-07-30-unflushed-byte.c
+++ b/test/regression/2007-07-30-unflushed-byte.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 #include <assert.h>
 
diff --git a/test/regression/2007-08-01-bool-zext-in-call.ll b/test/regression/2007-08-01-bool-zext-in-call.ll
index fc77785d..1a4bf4f3 100644
--- a/test/regression/2007-08-01-bool-zext-in-call.ll
+++ b/test/regression/2007-08-01-bool-zext-in-call.ll
@@ -1,12 +1,6 @@
-; RUN: rm -rf %T/xxx
-;
-; The output directory must be explicitly set so that it ends up in the Output/
-; directory which is not scanned for .ll files by llvm-lit, otherwise running
-; test suite a second time will cause problems because assembly.ll generated by
-; executing this test case the first time will be detected as a test case.
-;
-; RUN: llvm-as -f %s -o - | %klee --output-dir=%T/xxx
-; RUN: not test -f %T/xxx/klee-last/test0001.abort.err
+; RUN: rm -rf %t.klee-out
+; RUN: llvm-as -f %s -o - | %klee --output-dir=%t.klee-out
+; RUN: not test -f %t.klee-out/test0001.abort.err
 
 declare void @klee_abort()
 
diff --git a/test/regression/2007-08-01-cache-unclear-on-overwrite-flushed.c b/test/regression/2007-08-01-cache-unclear-on-overwrite-flushed.c
index 15f4e90e..0aa20896 100644
--- a/test/regression/2007-08-01-cache-unclear-on-overwrite-flushed.c
+++ b/test/regression/2007-08-01-cache-unclear-on-overwrite-flushed.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 #include <assert.h>
 #include <stdio.h>
diff --git a/test/regression/2007-08-06-64bit-shift.c b/test/regression/2007-08-06-64bit-shift.c
index 958e56c0..ac282dbd 100644
--- a/test/regression/2007-08-06-64bit-shift.c
+++ b/test/regression/2007-08-06-64bit-shift.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 #include <assert.h>
 
diff --git a/test/regression/2007-08-06-access-after-free.c b/test/regression/2007-08-06-access-after-free.c
index a1812062..ae80b8b8 100644
--- a/test/regression/2007-08-06-access-after-free.c
+++ b/test/regression/2007-08-06-access-after-free.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 #include <assert.h>
 
diff --git a/test/regression/2007-08-08-free-zero.c b/test/regression/2007-08-08-free-zero.c
index 935b04fd..3718f3cf 100644
--- a/test/regression/2007-08-08-free-zero.c
+++ b/test/regression/2007-08-08-free-zero.c
@@ -1,6 +1,7 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
-// RUN: ls %T/klee-last | not grep *.err
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
+// RUN: ls %t.klee-out | not grep *.err
 
 #include <stdlib.h>
 
diff --git a/test/regression/2007-08-16-invalid-constant-value.c b/test/regression/2007-08-16-invalid-constant-value.c
index ea0a5fee..e0b304f4 100644
--- a/test/regression/2007-08-16-invalid-constant-value.c
+++ b/test/regression/2007-08-16-invalid-constant-value.c
@@ -2,7 +2,8 @@
 // RUN: %llvmgcc %s -emit-llvm -O2 -c -o %t1.bc
 // RUN: llvm-as -f %p/../Feature/_utils._ll -o %t2.bc
 // RUN: llvm-link %t1.bc %t2.bc -o %t3.bc
-// RUN: %klee %t3.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t3.bc
 
 #include <assert.h>
 
diff --git a/test/regression/2007-08-16-valid-write-to-freed-object.c b/test/regression/2007-08-16-valid-write-to-freed-object.c
index 472b7de8..1fca1cca 100644
--- a/test/regression/2007-08-16-valid-write-to-freed-object.c
+++ b/test/regression/2007-08-16-valid-write-to-freed-object.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 unsigned sym() {
   unsigned x;
diff --git a/test/regression/2007-10-11-free-of-alloca.c b/test/regression/2007-10-11-free-of-alloca.c
index 44a9ed4e..cfd633dc 100644
--- a/test/regression/2007-10-11-free-of-alloca.c
+++ b/test/regression/2007-10-11-free-of-alloca.c
@@ -1,10 +1,11 @@
 // RUN: %llvmgcc %s -g -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc 2>&1 | FileCheck %s
-// RUN: test -f %T/klee-last/test000001.free.err
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc 2>&1 | FileCheck %s
+// RUN: test -f %t.klee-out/test000001.free.err
 
 int main() {
   int buf[4];
-  // CHECK: 2007-10-11-free-of-alloca.c:8: free of alloca
+  // CHECK: 2007-10-11-free-of-alloca.c:9: free of alloca
   free(buf); // this should give runtime error, not crash
   return 0;
 }
diff --git a/test/regression/2007-10-11-illegal-access-after-free-and-branch.c b/test/regression/2007-10-11-illegal-access-after-free-and-branch.c
index 73b3ed3f..c5cffa36 100644
--- a/test/regression/2007-10-11-illegal-access-after-free-and-branch.c
+++ b/test/regression/2007-10-11-illegal-access-after-free-and-branch.c
@@ -1,6 +1,7 @@
 // RUN: %llvmgcc %s -emit-llvm -g -c -o %t1.bc
-// RUN: %klee --optimize %t1.bc 2>&1 | FileCheck %s
-// RUN: test -f %T/klee-last/test000001.ptr.err
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out --optimize %t1.bc 2>&1 | FileCheck %s
+// RUN: test -f %t.klee-out/test000001.ptr.err
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -14,7 +15,7 @@ int main(int argc, char **argv) {
   free(buf);
   if (x)
   {
-    // CHECK: 2007-10-11-illegal-access-after-free-and-branch.c:18: memory error: out of bound pointer
+    // CHECK: 2007-10-11-illegal-access-after-free-and-branch.c:19: memory error: out of bound pointer
     return buf[2];
   }
   klee_silent_exit(0);
diff --git a/test/regression/2007-10-12-failed-make-symbolic-after-copy.c b/test/regression/2007-10-12-failed-make-symbolic-after-copy.c
index bfe61f2c..800b57e7 100644
--- a/test/regression/2007-10-12-failed-make-symbolic-after-copy.c
+++ b/test/regression/2007-10-12-failed-make-symbolic-after-copy.c
@@ -1,6 +1,7 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
-// RUN: test -f %T/klee-last/test000001.ktest
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
+// RUN: test -f %t.klee-out/test000001.ktest
 
 int main() {
   unsigned x, y[4];
diff --git a/test/regression/2008-03-04-free-of-global.c b/test/regression/2008-03-04-free-of-global.c
index 5351128d..3416fd61 100644
--- a/test/regression/2008-03-04-free-of-global.c
+++ b/test/regression/2008-03-04-free-of-global.c
@@ -1,11 +1,12 @@
 // RUN: %llvmgcc %s -g -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc 2>&1 | FileCheck %s
-// RUN: test -f %T/klee-last/test000001.free.err
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc 2>&1 | FileCheck %s
+// RUN: test -f %t.klee-out/test000001.free.err
 
 int buf[4];
 
 int main() {
-  // CHECK: 2008-03-04-free-of-global.c:9: free of global
+  // CHECK: 2008-03-04-free-of-global.c:10: free of global
   free(buf); // this should give runtime error, not crash
   return 0;
 }
diff --git a/test/regression/2008-03-11-free-of-malloc-zero.c b/test/regression/2008-03-11-free-of-malloc-zero.c
index d096818b..07ec2918 100644
--- a/test/regression/2008-03-11-free-of-malloc-zero.c
+++ b/test/regression/2008-03-11-free-of-malloc-zero.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee --exit-on-error %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t1.bc
 
 #include <stdlib.h>
 
diff --git a/test/regression/2008-04-10-bad-alloca-free.c b/test/regression/2008-04-10-bad-alloca-free.c
index a6215f64..3404a42e 100644
--- a/test/regression/2008-04-10-bad-alloca-free.c
+++ b/test/regression/2008-04-10-bad-alloca-free.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee --exit-on-error %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t1.bc
 
 void f(int *addr) {
   klee_make_symbolic(addr, sizeof *addr, "moo");
diff --git a/test/regression/2008-05-23-gep-with-global-const.c b/test/regression/2008-05-23-gep-with-global-const.c
index 3ad9b24e..6bd78dd2 100644
--- a/test/regression/2008-05-23-gep-with-global-const.c
+++ b/test/regression/2008-05-23-gep-with-global-const.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc -emit-llvm -O0 -c -o %t.bc %s
-// RUN: %klee --exit-on-error %t.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t.bc
 
 #include <assert.h>
 
diff --git a/test/regression/2012-05-13-asm-causes-aborts.c b/test/regression/2012-05-13-asm-causes-aborts.c
index 6622d02b..322e5bb8 100644
--- a/test/regression/2012-05-13-asm-causes-aborts.c
+++ b/test/regression/2012-05-13-asm-causes-aborts.c
@@ -1,5 +1,6 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee %t1.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t1.bc
 
 int main(int argc, char *argv[]){
 	__asm__ __volatile__ ("movl %eax, %eax");
diff --git a/test/regression/2014-07-04-unflushed-error-report.c b/test/regression/2014-07-04-unflushed-error-report.c
index 63431370..0518fb4d 100644
--- a/test/regression/2014-07-04-unflushed-error-report.c
+++ b/test/regression/2014-07-04-unflushed-error-report.c
@@ -1,6 +1,7 @@
 // RUN: %llvmgcc %s -emit-llvm -g -O0 -c -o %t.bc
-// RUN: %klee -check-overshift %t.bc 2> %t.log
-// RUN: FileCheck -input-file=%T/klee-last/test000001.overshift.err %s
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out -check-overshift %t.bc 2> %t.log
+// RUN: FileCheck -input-file=%t.klee-out/test000001.overshift.err %s
 
 /* This test checks that the error file isn't empty and contains the
  * right content.
@@ -18,7 +19,7 @@ int main()
   // CHECK-NEXT: 2014-07-04-unflushed-error-report.c
   // FIXME: Need newer FileCheck for to do ``Line: [[@LINE+1]]``
   // Just hardcode line number for now
-  // CHECK-NEXT: Line: 22
+  // CHECK-NEXT: Line: 23
   result = x << y;
 
   return 0;