about summary refs log tree commit diff homepage
path: root/unittests
AgeCommit message (Collapse)Author
2024-01-30Change `GetConstraintLog` to work with `std::string`s instead of `char*`sDaniel Schemmel
2024-01-30Avoid generating array names in solver builders that could accidently collideMartin Nowack
If an array name ended with a number, adding a number-only suffix could generate the same name used as part of the solvers. In the specific testcase `val_1` became solver array `val_111` which collided with array `val_11` that became `val_111` as well. Using an `_` as prefix for the suffix, solves that problem in general, i.e. `val_1` becomes `val_1_11` and `val_11` becomes `val_11_1`. Fixes #1668
2024-01-12Renamed PTree to ExecutionTree (and similar)Cristian Cadar
2024-01-12SearcherTest: remove redundant root init, fix branch typeFrank Busse
2024-01-12new: persistent ptree (-write-ptree) and klee-ptreeFrank Busse
Introduce three different kinds of process trees: 1. Noop: does nothing (e.g. no allocations for DFS) 2. InMemory: same behaviour as before (e.g. RandomPathSearcher) 3. Persistent: similar to InMemory but writes nodes to ptree.db and tracks information such as branch type, termination type or source location (asm) in nodes. Enabled with -write-ptree ptree.db files can be analysed/plotted with the new "klee-ptree" tool.
2023-07-10remove timings from kdalloc testsDaniel Schemmel
2023-07-10Simplify KDAlloc testsDaniel Schemmel
2023-07-06rename Allocator::location_info to Allocator::locationInfo forDaniel Schemmel
consistency
2023-07-06Perform location_info tests in KDAlloc's random testDaniel Schemmel
2023-06-26RefTest: suppress -Wself-moveJulian Büning
This warning (introduced with GCC 13, also present in clang) warns precisely about what we want to test here.
2023-06-07unittests/CMakeLists.txt: set gtest include dir only if necessaryJulian Büning
2023-06-07unittests/CMakeLists.txt: do not echo GTEST_SRC_DIR on errorJulian Büning
This prevents the error message to include the internal "GTEST_SRC_DIR-NOTFOUND" value.
2023-06-07unittests/CMakeLists.txt: no UNITTEST_MAIN_LIBSJulian Büning
variable obsoleted by 5607a7f1910e579acc0b93b1ae2caba88e7d5fd7
2023-06-07unittests/CMakeLists.txt: remove obsolete policyJulian Büning
Checking for policy CMP0077 is obsolete as we now require CMake 3.16.0 as minimum version.
2023-06-07unittests/CMakeLists.txt: fix LLVM find_package supportJulian Büning
broken by 3ef5c9d0cd51babb7c4ec2d7bb76d0cb7e47a65c, which removed the "USE_CMAKE_FIND_PACKAGE_LLVM" variable and no longer includes AddLLVM.cmake
2023-06-07unittests/CMakeLists.txt: gtest check for LLVM 13+Julian Büning
We previously used `LLVM_EXPORTED_TARGETS` defined in LLVMConfig.cmake. This variable is no longer defined starting from LLVM 13. Alternatively, we use the fact that LLVM's gtest target always depends on LLVMSupport.
2023-04-21use unique_ptr all throughout the solver chainDaniel Schemmel
2023-04-20remove unused rng adaptor functionsDaniel Schemmel
2023-04-18change some obsolete KDAlloc commentsJulian Büning
- mappings were only shared in a former version of KDAlloc - `AllocationFactory(std::size_t, std::uint32_t)`'s second parameter is used for quarantine size, not the location of the mapping
2023-03-23Run KDAlloc/rusage unittest a few times to allow for swapfile interferenceDaniel Schemmel
2023-03-22Change `llvm_map_components_to_libnames` to `llvm_config` CMake functionMartin Nowack
With recent LLVM versions, this should allow to link against dynamic LLVM libraries.
2023-03-17Update KDAlloc unittestsMartin Nowack
2023-03-17[cmake] Use LLVM's CMake functionality onlyMartin Nowack
LLVM became more complex, use LLVM's CMake functionality directly instead of replicating this behaviour in KLEE's build system. Use the correct build flags provided by LLVM itself. This is influenced by the way LLVM is built in the first place. Remove older CMake support (< 3.0).
2023-03-16Add some unit tests for KDAllocDaniel Schemmel
2022-06-15Spelling Fixesm-davis
2022-05-05cmake: try using system installation of GTest if it's presentLukáš Zaoral
This is a patch that I made few months ago as Fedora forbids bundling and using pieces of software provided by other packages in its repositories but forgot to upstream it at that time. [1] It has been rebased and improved so that it also reflects changes made in #1458. This should also make the compilation of unittests easier for our users as they don't need to clone googletest from GitHub anymore and just use package manager in the distro of their choice, provided that the gtest package includes a corresponding CMake module. [1]: https://src.fedoraproject.org/rpms/klee/blob/4c81b78/f/use-system-gtest.patch
2022-03-17remove LLVM < 6 from build/test scriptsFrank Busse
2022-03-09tests: make UBSAN print stack tracesLukáš Zaoral
2022-03-09fix CMake: gtest from llvm includes gtest_mainJulian Büning
2022-01-05introduce BranchTypesFrank Busse
2022-01-05unittests/TestMain: show stack trace on errorJulian Büning
2022-01-05fix CMake: use own TestMain instead of gtest_mainJulian Büning
Before, we would use gtest_main as provided by either LLVM or Google Test itself; the TestMain.cpp was ignored (contrary to its source code comment). In newer versions of Google Test (1.8.1+), gtest_main uses `__FILE__` for its "Running main() from" line, but llvm-lit (which we use to invoke unit tests) currently matches exactly "Running main() from gtest_main.cc" for determining whether to skip this line. This results in spurious "tests" that will be shown as unresolved.
2022-01-05CMake: set Google Test options properlyJulian Büning
If the used CMake version is recent enough to support the necessary policy CMP0077, set INSTALL_GTEST using normal variables instead of cache variables. We never want to allow Google Test to add to the install target, so we should not allow a user to interfere with this. In addition, we set BUILD_GMOCK=OFF (and the necessary BUILD_GTEST=ON for Google Test 1.8.0), as our current tests do not require Google Mock.
2022-01-05fix CMake: GTEST_INSTALL -> INSTALL_GTESTJulian Büning
As far as I can tell, the variable intended to be set here was never called GTEST_INSTALL.
2022-01-05CMake: include GTest include hint for 1.8.0+Julian Büning
Later versions of googletest also ship googlemock alongside googletest. Thus, the include directory we are looking for is located in a subdirectory. The source directory, however, does not change as googletest/CMakeLists.txt references variables set in CMakeLists.txt of the root directory and is not intended to be included directly.
2020-11-04[cmake] Remove several leftovers from old autoconf build systemMartin Nowack
2020-09-03Fix PTree::remove to clean the tree properlySebastian Poeplau
The previous version left unnecessary intermediate nodes behind, sometimes leading to very long paths in the tree.
2020-07-30[unittests] use static PTree::remove method in SearcherTestFrank Busse
2020-07-30introduce --rng-initial-seed=<unsigned>Frank Busse
* move global theRNG into Executor * pass theRNG via ctor to searchers * remove some type warnings from RNG.cpp Fixes #1023.
2020-07-01Separate constraint set and constraint managerMartin Nowack
2020-07-01Move constraint implementation from header to cpp filesMartin Nowack
2020-06-29Enable subsets for RandomPathSearcherTimotej Kapus
2020-04-30Removed include/klee/util and moved header files to appropriate placesCristian Cadar
2020-04-30Move header files from lib/Expr to include/klee/Expr to eliminate includes ↵Cristian Cadar
using "../"
2020-04-30Removed the Internal directory from include/kleeCristian Cadar
2020-04-07Add unit test for Z3Solver::getConstraintLogDaniel Grumberg
2020-02-19Add move assignment operator and move construct for `ref` class.Martin Nowack
2020-02-19Add `ReferenceCounter` struct utilized by ref<>Martin Nowack
Using KLEE's `ref<>` shared ptr requires the referenced object to contain a reference counter to be added and initialised to 0 as part of the constructor. To support better reuse of the `ref<>` ptr add a `ReferenceCounter` struct. Just adding this struct to a new class/struct as member enables reference counting with `ref<>` - no additional counter management needed.
2020-02-19Fix ptr reference invalidation if last reference gets freed before new ↵Martin Nowack
reference assigned.
2019-12-12[optimize-array] Hash collision testTimotej Kapus