about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2022-03-25 14:05:56 +0000
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2022-05-06 11:14:32 +0100
commit3515cb00c750ec5f081d4d0e3a1c386080ccda7e (patch)
treeba7f66d4816d189a48164761e553d17ff76609dc /test
parent0ceea620c91c53a5167af83deddc97571bb67808 (diff)
downloadklee-3515cb00c750ec5f081d4d0e3a1c386080ccda7e.tar.gz
tests: make function pointer tests more robust
Diffstat (limited to 'test')
-rw-r--r--test/Feature/FunctionAliasExit.c4
-rw-r--r--test/Feature/FunctionPointer.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/test/Feature/FunctionAliasExit.c b/test/Feature/FunctionAliasExit.c
index b30838d0..40b5d617 100644
--- a/test/Feature/FunctionAliasExit.c
+++ b/test/Feature/FunctionAliasExit.c
@@ -1,6 +1,8 @@
 // RUN: %clang %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
-// RUN: %klee --output-dir=%t.klee-out -function-alias=exit:end %t.bc 2>&1 | FileCheck %s
+// RUN: %klee --search=bfs --output-dir=%t.klee-out -function-alias=exit:end %t.bc 2>&1 | FileCheck %s
+
+#include "klee/klee.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/test/Feature/FunctionPointer.c b/test/Feature/FunctionPointer.c
index 649946dc..b2e31ee0 100644
--- a/test/Feature/FunctionPointer.c
+++ b/test/Feature/FunctionPointer.c
@@ -1,6 +1,6 @@
 // RUN: %clang %s -emit-llvm -g -c -o %t.bc
 // RUN: rm -rf %t.klee-out
-// RUN: %klee --output-dir=%t.klee-out --write-no-tests --exit-on-error %t.bc 2>&1 | FileCheck %s
+// RUN: %klee --search=bfs --output-dir=%t.klee-out --write-no-tests --exit-on-error %t.bc 2>&1 | FileCheck %s
 
 #include "klee/klee.h"
 
@@ -42,8 +42,8 @@ int main(int argc, char **argv) {
   void (*fp2)(const char *);
   klee_make_symbolic(&fp2, sizeof fp2, "fp2");
   if(fp2 == baz || fp2 == foo) {
-    // CHECK-DAG: baz: calling via symbolic!
-    // CHECK-DAG: foo: calling via symbolic!
+    // CHECK: baz: calling via symbolic!
+    // CHECK: foo: calling via symbolic!
     fp2("calling via symbolic!");
   }