aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2017-07-22 01:28:40 +0200
committerMartin Nowack <martin@se.inf.tu-dresden.de>2017-07-23 12:18:35 +0200
commitafae176824d8fd1733e5e302a62e6bd09a86aff2 (patch)
tree417ff3c15fd0499d8e61a1f180c75beb5cde6d4b /test
parent37e92d0c802524c19a9a84164253639aac47fee3 (diff)
downloadklee-afae176824d8fd1733e5e302a62e6bd09a86aff2.tar.gz
Updated test cases to reflect removal of LLVM 2.9
Diffstat (limited to 'test')
-rw-r--r--test/Feature/ubsan_signed_overflow.c9
-rw-r--r--test/Feature/ubsan_unsigned_overflow.c9
-rw-r--r--test/Intrinsics/objectsize.ll4
-rw-r--r--test/Intrinsics/objectsize.llvm29.ll34
-rw-r--r--test/lit.cfg2
-rw-r--r--test/regression/2016-11-24-bitcast-weak-alias.c13
6 files changed, 10 insertions, 61 deletions
diff --git a/test/Feature/ubsan_signed_overflow.c b/test/Feature/ubsan_signed_overflow.c
index 9816d496..66288d2e 100644
--- a/test/Feature/ubsan_signed_overflow.c
+++ b/test/Feature/ubsan_signed_overflow.c
@@ -2,9 +2,6 @@
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out %t.bc 2>&1 | FileCheck %s
-// llvm-gcc 2.9 does not support -fsanitize=signed-integer-overflow
-// REQUIRES: not-llvm-2.9
-
#include "klee/klee.h"
int main()
@@ -16,13 +13,13 @@ int main()
klee_make_symbolic(&x, sizeof(x), "x");
klee_make_symbolic(&y, sizeof(y), "y");
- // CHECK: ubsan_signed_overflow.c:20: overflow on unsigned addition
+ // CHECK: ubsan_signed_overflow.c:17: overflow on unsigned addition
result = x + y;
- // CHECK: ubsan_signed_overflow.c:23: overflow on unsigned subtraction
+ // CHECK: ubsan_signed_overflow.c:20: overflow on unsigned subtraction
result = x - y;
- // CHECK: ubsan_signed_overflow.c:26: overflow on unsigned multiplication
+ // CHECK: ubsan_signed_overflow.c:23: overflow on unsigned multiplication
result = x * y;
return 0;
diff --git a/test/Feature/ubsan_unsigned_overflow.c b/test/Feature/ubsan_unsigned_overflow.c
index 82eacdd7..568b17ba 100644
--- a/test/Feature/ubsan_unsigned_overflow.c
+++ b/test/Feature/ubsan_unsigned_overflow.c
@@ -2,9 +2,6 @@
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out %t.bc 2>&1 | FileCheck %s
-// llvm-gcc 2.9 does not support -fsanitize=unsigned-integer-overflow
-// REQUIRES: not-llvm-2.9
-
#include "klee/klee.h"
int main()
@@ -16,13 +13,13 @@ int main()
klee_make_symbolic(&x, sizeof(x), "x");
klee_make_symbolic(&y, sizeof(y), "y");
- // CHECK: ubsan_unsigned_overflow.c:20: overflow on unsigned addition
+ // CHECK: ubsan_unsigned_overflow.c:17: overflow on unsigned addition
result = x + y;
- // CHECK: ubsan_unsigned_overflow.c:23: overflow on unsigned subtraction
+ // CHECK: ubsan_unsigned_overflow.c:20: overflow on unsigned subtraction
result = x - y;
- // CHECK: ubsan_unsigned_overflow.c:26: overflow on unsigned multiplication
+ // CHECK: ubsan_unsigned_overflow.c:23: overflow on unsigned multiplication
result = x * y;
return 0;
diff --git a/test/Intrinsics/objectsize.ll b/test/Intrinsics/objectsize.ll
index 8b75ce8f..4bb59596 100644
--- a/test/Intrinsics/objectsize.ll
+++ b/test/Intrinsics/objectsize.ll
@@ -1,7 +1,3 @@
-; Unfortunately LLVM 2.9 has a different suffix for the ``llvm.objectsize`` instrinsic
-; so this LLVM IR fails to verify for that version.
-;
-; REQUIRES: not-llvm-2.9
; RUN: %llvmas %s -o=%t.bc
; RUN: rm -rf %t.klee-out
; RUN: %klee -exit-on-error --output-dir=%t.klee-out -disable-opt %t.bc
diff --git a/test/Intrinsics/objectsize.llvm29.ll b/test/Intrinsics/objectsize.llvm29.ll
deleted file mode 100644
index 386eaddb..00000000
--- a/test/Intrinsics/objectsize.llvm29.ll
+++ /dev/null
@@ -1,34 +0,0 @@
-; FIXME: Remove this test case when we drop LLVM 2.9 support
-; REQUIRES: llvm-2.9
-; RUN: %llvmas %s -o=%t.bc
-; RUN: rm -rf %t.klee-out
-; RUN: %klee -exit-on-error --output-dir=%t.klee-out -disable-opt %t.bc
-; ModuleID = 'objectsize.c'
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-define i32 @main() nounwind {
-entry:
- %a = alloca i8*, align 8
- %0 = load i8** %a, align 8
- %1 = call i64 @llvm.objectsize.i64(i8* %0, i1 true)
- %cmp = icmp ne i64 %1, 0
- br i1 %cmp, label %abort.block, label %continue.block
-
-continue.block:
- %2 = load i8** %a, align 8
- %3 = call i64 @llvm.objectsize.i64(i8* %2, i1 false)
- %cmp1 = icmp ne i64 %3, -1
- br i1 %cmp1, label %abort.block, label %exit.block
-
-exit.block:
- ret i32 0
-
-abort.block:
- call void @abort()
- unreachable
-}
-
-declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readnone
-
-declare void @abort() noreturn nounwind
diff --git a/test/lit.cfg b/test/lit.cfg
index 9c557a78..6cb85712 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -158,7 +158,7 @@ if int(config.llvm_version_major) == 2:
# Add feature for the LLVM version in use, so it can be tested in REQUIRES and
# XFAIL checks. We also add "not-XXX" variants, for the same reason.
-known_llvm_versions = set(["2.9", "3.4", "3.5", "3.6"])
+known_llvm_versions = set(["3.4", "3.5", "3.6"])
current_llvm_version = "%s.%s" % (config.llvm_version_major,
config.llvm_version_minor)
config.available_features.add("llvm-" + current_llvm_version)
diff --git a/test/regression/2016-11-24-bitcast-weak-alias.c b/test/regression/2016-11-24-bitcast-weak-alias.c
index 3e4ebe64..d35f6fa7 100644
--- a/test/regression/2016-11-24-bitcast-weak-alias.c
+++ b/test/regression/2016-11-24-bitcast-weak-alias.c
@@ -26,18 +26,11 @@ int alias_function(struct v1 *, struct v1 *, int)
int main(int argc, char** argv) {
struct v2 local = { .e= 0, .f=0 };
- int choice = (argc == 1);
int number = 0;
- // FIXME: Drop the guard when llvm 2.9 is dropped.
- // Prevent actually making the call at runtime due to llvm-gcc
- // injecting an abort if the call is made. The call is guarded
- // in such a way that the compiler cannot remove the call.
- if (choice) {
- // Call via a bitcasted alias.
- number = ((int (*)(struct v2 *, struct v2 *, int))alias_function)(
- &local, &local, 0);
- }
+ // Call via a bitcasted alias.
+ number = ((int (*)(struct v2 *, struct v2 *, int))alias_function)(&local,
+ &local, 0);
return number % 255;
}