diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/StaticDestructor.cpp | 2 | ||||
-rw-r--r-- | test/Coverage/ReadArgs.c | 2 | ||||
-rw-r--r-- | test/Feature/AsmAddresses.c | 25 | ||||
-rw-r--r-- | test/Feature/SourceMapping.c | 55 | ||||
-rw-r--r-- | test/Makefile | 5 |
5 files changed, 59 insertions, 30 deletions
diff --git a/test/CXX/StaticDestructor.cpp b/test/CXX/StaticDestructor.cpp index 6e6f033d..adc449a5 100644 --- a/test/CXX/StaticDestructor.cpp +++ b/test/CXX/StaticDestructor.cpp @@ -2,7 +2,7 @@ // RUN: %llvmgxx %s -emit-llvm -g -O0 -c -o %t1.bc // RUN: rm -rf %t.klee-out -// RUN: %klee --output-dir=%t.klee-out --optimize=false --libc=uclibc --no-output %t1.bc 2> %t1.log +// RUN: %klee --output-dir=%t.klee-out --optimize=false --libc=klee --no-output %t1.bc 2> %t1.log // RUN: grep ":17: memory error" %t1.log #include <cassert> diff --git a/test/Coverage/ReadArgs.c b/test/Coverage/ReadArgs.c index 1001dac1..8eae53a1 100644 --- a/test/Coverage/ReadArgs.c +++ b/test/Coverage/ReadArgs.c @@ -1,7 +1,7 @@ // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc // RUN: rm -rf %t.klee-out // RUN: echo " --output-dir=%t.klee-out " > %t1.args -// RUN: %klee --read-args %t1.args %t1.bc +// RUN: %klee @%t1.args %t1.bc // RUN: test -d %t.klee-out int main() { diff --git a/test/Feature/AsmAddresses.c b/test/Feature/AsmAddresses.c deleted file mode 100644 index cfe566af..00000000 --- a/test/Feature/AsmAddresses.c +++ /dev/null @@ -1,25 +0,0 @@ -// RUN: %llvmgcc -emit-llvm -g -c -o %t.bc %s -// RUN: rm -rf %t.klee-out -// RUN: %klee --output-dir=%t.klee-out --exit-on-error --use-asm-addresses %t.bc - -// RUN: %llvmgcc -emit-llvm -DOVERLAP -g -c -o %t.bc %s -// RUN: rm -rf %t.klee-out -// RUN: not %klee --output-dir=%t.klee-out --exit-on-error --use-asm-addresses %t.bc - -#include <assert.h> - - -volatile unsigned char x0 __asm ("0x0021"); -volatile unsigned char whee __asm ("0x0WHEE"); - -#ifdef OVERLAP -volatile unsigned int y0 __asm ("0x0030"); -volatile unsigned int y1 __asm ("0x0032"); -#endif - -int main() { - assert(&x0 == (void*) 0x0021); - assert(&whee != (void*) 0x0); - - return 0; -} diff --git a/test/Feature/SourceMapping.c b/test/Feature/SourceMapping.c new file mode 100644 index 00000000..9835d701 --- /dev/null +++ b/test/Feature/SourceMapping.c @@ -0,0 +1,55 @@ +// Check that we properly associate instruction level statistics with source +// file and line. +// +// RUN: %llvmgcc %s -emit-llvm -g -O0 -c -o %t1.bc +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t1.bc +// RUN: FileCheck < %t.klee-out/run.istats %s + +// CHECK: positions: instr line +// CHECK: ob={{.*}}/SourceMapping.c{{.*}}/assembly.ll + +// Assuming the compiler doesn't reorder things, f0 should be first, and it +// should immediately follow the first file name marker. +// CHECK: fl={{.*}}/SourceMapping.c +// CHECK-NEXT: fn=f0 + +// Ensure we have a known position for the first instruction (instr and line +// should be non-zero). + +// CHECK-NEXT: {{[1-9][0-9]*}} {{[1-9][0-9]*}} + + +// Ensure we have the right line number (and check called function markers). +// CHECK: fn=f1 +// CHECK: cfn=f0 +// CHECK-NEXT: calls=1 {{[1-9][0-9]*}} +// CHECK-NEXT: {{[1-9][0-9]*}} 48 {{.*}} + +// This check just brackets the checks above, to make sure they fall in the +// appropriate region of the run.istats file. +// +// CHECK: fn=main + + + + + + + +// KEEP THIS AS LINE 40 + +int f0(int a, int b) { + return a + b; +} + +int f1(int a, int b) { + // f0 is called on line 48 + return f0(a, b); +} + +int main() { + int x = f1(1, 2); + + return x; +} diff --git a/test/Makefile b/test/Makefile index 31896075..02d0a36f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -23,11 +23,10 @@ include Makefile.tests #===------------------------------------------------------------------------===# ULIMIT = ulimit -t 600 ; ulimit -d 512000 ; -# FIXME: Fix test suite so we can run lit in parallel. ifdef VERBOSE -LIT_ARGS := -j1 -v +LIT_ARGS := -v else -LIT_ARGS := -j1 -s -v +LIT_ARGS := -s -v endif ifdef TESTSUITE |