about summary refs log tree commit diff homepage
path: root/test
AgeCommit message (Collapse)Author
2017-10-15Fixed assert in BFSSearcher that does not hold as part of interleaved searcherJulian Büning
2017-10-06Removed the word 'unsigned' from integer overflow error messagesAndrew Santosa
2017-10-04Remove Autoconf/Makefile build system and adjust the TravisCIDan Liew
configuration, TravisCI scripts and Dockerfile build appropriately. There are a bunch of clean ups this enables but this commit doesn't attempt them. We can do that in future commits.
2017-08-10Added a basic test for klee-replayCristian Cadar
2017-08-09Merge pull request #742 from ccadar/foldCristian Cadar
Added checks for div/mod by zero and overshifts in constant expressio…
2017-08-07Added checks for div/mod by zero and overshifts in constant expressions. ↵Cristian Cadar
Such div/mod by zero expressions would previously crash KLEE. Added two test cases, one for div/mod by zero, the other for overshift. This fixes the bug reported in #268.
2017-08-04Removed merging searchersLukas Wölfer
2017-07-29Added an optional KInstruction* argument to evalConstant and ↵Cristian Cadar
evalConstantExpr which allows us to print the location associated with the constant in any error messages. Added a test case for the unsupported features for taking the address of a label, which exercises the patch.
2017-07-25Added regression test for bug reported by @kren1 in #262Cristian Cadar
2017-07-25Cleanup tests for last LLVM 2.9 referencesAndrea Mattavelli
2017-07-25Re-enable parts of `FloatingPointOps.ll`. The message about failuresDan Liew
doesn't seem relevant anymore given that LLVM 3.4 is the minimum version KLEE supports. Also do minor clean up. This was spotted by @andreamattavelli.
2017-07-24Moved klee_choose from klee-libc to KLEE intrinsics.Cristian Cadar
2017-07-24more portable shebangsJörg Thalheim
This is useful on systems like NixOS, where python3 is not in /usr/bin/python3 as well as for people using alternative ways to install python such as virtualenv/pyenv. Some scripts where already using '/usr/bin/env'. With this pull request it gets more consistent. For background information see also: https://github.com/systemd/systemd/pull/5816
2017-07-23Updated test cases to reflect removal of LLVM 2.9Martin Nowack
2017-07-19Implement basic support for vectorized instructions.Dan Liew
We use LLVM's Scalarizer pass to remove most vectorized code so that the Executor only needs to support the InsertElement and ExtractElement instructions. This pass was not available in LLVM 3.4 so to support that LLVM version the pass has been back ported. To check that the Executor is not receiving vector operand types that it can't handle assertions have been added. There are a few limitations to this implementation. * The InsertElement and ExtractElement index cannot be symbolic. * There is no support for LLVM < 3.4.
2017-06-08Merge pull request #667 from andreamattavelli/fix_macos_varargCristian Cadar
Removing flaky test Vararg.c from Darwin build until we find a proper…
2017-06-07Prevent test failure when realloc fails in test/Feature/Realloc.cAndrew Santosa
2017-06-05Removing flaky test Vararg.c from Darwin build until we find a proper fixAndrea Mattavelli
2017-06-05Fix test failure on systems with libstdc++ corresponding to gcc7.Dan Liew
This fixes #664. As reported by @jirislaby the `test/Feature/LongDouble.cpp` test fails to compile with Clang 3.4 due to new changes the libstdc++ headers. This ends up giving errors like ``` In file included from /home/abuild/rpmbuild/BUILD/klee-1.3.0+20170409/test/Feature/LongDouble.cpp:12: In file included from /usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/cstdlib:77: /usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/std_abs.h:101:3: error: unknown type name '__float128' __float128 ^ /usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/std_abs.h:102:7: error: unknown type name '__float128' abs(__float128 __x) ^ 2 errors generated. ``` Clang 4.0 seems fine with this source file so the problem has already been addressed upstream so we don't need to file a bug. We just need to move to a newer LLVM version to fix this properly! To work around this the test has been made into a C program rather than a C++ program to avoid including the C++ headers. The program wasn't using any important C++ features anyway so this seems like a sensible change.
2017-05-24travis CI: add LLVM 3.5 and 3.6 testsJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-04-08[CMake] Don't redownload FileCheck.cpp if it existsemlai
2017-04-06[NFC] Reindent `test/lit.cfg` and add vim mode line to use rightDan Liew
indentation and syntax highlighting.
2017-04-06test: lit, add geq/lt-llvm- configsJiri Slaby
This is useful for testing ranges. Especially when tests are run on later LLVM versions. This code is funny as it uses 2, 3, and 4 spaces for indentation :). This is extensively used in #605. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-03-23Add test case to check that on early exits stats are flushedDan Liew
2017-03-23Merge pull request #619 from jirislaby/FD_FailCristian Cadar
test: POSIX, stop FD_Fail to fail
2017-03-17test: POSIX, stop FD_Fail to failJiri Slaby
In our build environments, /etc/fstab is an empty file. Use /etc/mtab, which should be non-empty anywhere, hopefully. For the reference, the test fails as follows: FAIL: KLEE :: Runtime/POSIX/FD_Fail.c (188 of 212) ************ TEST 'KLEE :: Runtime/POSIX/FD_Fail.c' FAILED ************ Script: -- clang-3.8 -Iinclude test/Runtime/POSIX/FD_Fail.c -emit-llvm -O0 -c -o build/test/Runtime/POSIX/Output/FD_Fail.c.tmp1.bc rm -rf build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.klee-out build/bin/klee --output-dir=build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.klee-out --libc=uclibc --posix-runtime build/test/Runtime/POSIX/Output/FD_Fail.c.tmp1.bc --sym-files 0 0 --max-fail 1 > build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.log grep -q "fread(): ok" build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.log grep -q "fread(): fail" build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.log grep -q "fclose(): ok" build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.log grep -q "fclose(): fail" build/test/Runtime/POSIX/Output/FD_Fail.c.tmp.log -- Exit Code: 1 Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-03-17test: fix 'not' buildJiri Slaby
There was a typo and 'not' utility was tried to be built with FileCheck's libraries. But those can be undefined. Fix this by using the correct variable. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-03-15Fix test case for OSX: only weak aliases are supported on darwinAndrea Mattavelli
Rewritten tests by replacing 'XFAIL: darwin' with 'REQUIRES: not-darwin'
2017-03-15[Lit] Add system information (linux/darwim) to LIT configuration. Added ↵Dan Liew
'not-*' features that exist if target operating system does not match a list of know operating systems.
2017-03-07Merge pull request #608 from jirislaby/kill_testAndrea Mattavelli
test: ConstantExpr, kill bogus test
2017-03-06test: ConstantExpr, fix bogus testJiri Slaby
There is a test that thinks this should hold: ((&gInt >> 8) << 8) != ((&gInt << 8) >> 8) For example, if the address is 0x00123400, this means: 0x00123400 != 0x00123400 which is obviously not true. Kill the bogus assumption as it causes occasional failures in the tests. This is done by ORing the address with 1 so that we can have: 0x00123400 != 0x00123401 Convert also the respective truncated 32bit pointers to 64bit. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-03-06test: POSIX/DirSeek, cleanupJiri Slaby
* remove unused stat variable * use %ld for long int Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-03-06Merge pull request #609 from ccadar/warningsAndrea Mattavelli
Added new option --warnings-only-to-file which causes warnings to be written to warnings.txt only.
2017-03-01fix for PathOS.idgladtbx
2017-03-01Updated test cases that check warning messages.Cristian Cadar
2017-02-24Teach KLEE to respect the requested memory alignment of globals and stackDan Liew
variables when possible. Previously an alignment 8 was always used which did not faithfully emulate what was either explicitly requested in the LLVM IR or what the default alignment was for the target.
2017-02-21Add test case that causes an assertion failure in ↵Dan Liew
`klee::getDirectCallTarget(llvm::CallSite)`. The problem is that it doesn't handle bitcasted functions that call a weak alias.
2017-02-14Fix linker compatibility under macOSAndrea Mattavelli
2017-02-14Merge pull request #574 from delcypher/read_expr_missed_constaint_foldAndrea Mattavelli
ReadExpr::create() was missing an opportunity to constant fold
2017-02-14ReadExpr::create() was missing an opportunity to constant fold when handling ↵Dan Liew
constant arrays.
2017-02-13Merge pull request #506 from delcypher/travis_asan_ubsanCristian Cadar
Modify scripts and a test to allow ASan/UBSan builds.
2017-02-10test: fix broken Vararg testMartijn Thé
The helper function had int return type, while no value was being returned. Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2017-01-19Teach both build systems to pass the user provided CXXFLAGS and CFLAGSDan Liew
when using the native compiler in system tests. This fixes the `libkleeruntest` tests when building with ASan.
2017-01-16Remove undocumented and unused `check-local`, `check-dg` and `check-lit`Dan Liew
targets from Autoconf/Makefile build system. Having these around just confuses things.
2017-01-16Rename old build system targets so thatDan Liew
* lit tests are run by the `systemtests` target * The `check` target runs the `systemtests` and `unittests` target This make its target names consistent with the CMake build system.
2017-01-16[CMake] Rename "integrationtests" to "systemtests".Dan Liew
This was a proposal from #500. @andreamattavelli pointed out that the lit tests are really system tests rather than integration tests so this commit fixes the inappropriate naming that I chose.
2017-01-14Change how error handling is done in libkleeRuntest.Dan Liew
Previously error messages would be emitted but execution would continue which might not be desirable. Now a wrapper function (for fprintf) `report_internal_error()` is used which will cause the program to exit. The older behaviour of continuing to execute after an error can be achieved by setting a new environment variable `KLEE_RUN_TEST_ERRORS_NON_FATAL`. This commit also adds a test for each error case.
2017-01-14Fix bug reported privately by @danielschemmel .Dan Liew
If KLEE generates ktest files with `--posix-runtime` then if replaying using libkleeRuntest then replay would be incorrect because the `model_version` object would be unintentionally used during replay. For now just skip over that object and try the next one. Also emit a warning if the object names don't match.
2017-01-14Write tests to test `libkleeRuntest`. The `replay_posix_runtime.c`Dan Liew
test is marked XFAIL because there is a bug in the implementation of `libkleeRuntest`. Quite a few changes had to be made to the lit configuration in order to support these tests. To run the tests I had to fix #480 for the autoconf/Makefile build system otherwise the `libkleeRuntest` library would not be found by the system linker at runtime.
2017-01-08tests: Added substitution for llvm-arAdrian Herrera
Brings llvm-ar into line with llvm-as and lli, removing the assumption that llvm-ar is installed system wide