about summary refs log tree commit diff homepage
AgeCommit message (Collapse)Author
2014-02-14Added C test case that checks that concrete and symbolic overshiftDan Liew
behaviour for logical right shift are identical.
2014-02-14Fixed overshift of logical right shift by constant so that itDan Liew
overshifts to zero. Test case is included.
2014-02-14Fixed overshift of logical right shift by symbolic so that it overshiftsDan Liew
to zero. Test case is included.
2014-02-14Added C test case that checks that concrete and symbolic overshiftDan Liew
behaviour for left shift are identical.
2014-02-14Fixed overshifting an expression by a constant so that we overshift toDan Liew
zero. A test case was added for this. In addition the use to vc_bvExtract() was removed for shifting left by an expression because we don't want/need bitmasked behaviour anymore.
2014-02-14Added a test case for testing overshift behaviour of Shl and fixedDan Liew
a bug in the previous commit where 32-bit width was assumed.
2014-02-14Translate shl overshifts into 0Paul Marinescu
The other shift operators still need to be changed
2014-02-14Merge pull request #99 from delcypher/feature_support_stp_with_boostDan Liew
Upstream STP's libstp now depends on boost.
2014-02-14Merge pull request #70 from MartinNowack/feature_reading_archiveDan Liew
Add support for archive and single bc file linking
2014-02-14When running with -debug-only=klee_linker do not report the numberDan Liew
of modules left because this information is no longer correct (we no longer shrink the vector).
2014-02-14Refactor cleaning up memory in linkBCA() so that if linking failsDan Liew
then clean up is performed.
2014-02-14Refactor variable name s/RemovedSymbols/SymbolsToRemove/Dan Liew
because "RemovedSymbols" implies that the symbols have already been removed which is misleading because we don't remove until the end.
2014-02-14Correct and tidy up comments.Dan Liew
2014-02-12Fixed compilation of unittests with upstream STP (Boost dependency).Dan Liew
2014-02-09Merge pull request #100 from delcypher/pass-param-llvm-litCristian Cadar
Allow passing arbitrary command line flags to klee and kleaver when running llvm-lit
2014-02-06Fix access of iterators after they have been invalidatedMartin Nowack
Iterators get invalidated after elements of std::vector/set are deleted. Avoid this by remembering which elements need to be deleted and do it after iterating over the data structure.
2014-02-06When using KLEE's built-in Bitcode archive linker do not considerDan Liew
KLEE intrinsics as undefined symbols
2014-02-06Implement const_iterator interface for SpecialFunctionHandler soDan Liew
that clients can access HandlerInfo nicely.
2014-02-06Do not consider llvm intrinsics as undefined symbols in KLEE'sDan Liew
bitcode archive linker.
2014-02-06Improved archive (of bitcode modules) linking performance forDan Liew
LLVM >= 3.3 by effectively reimplementing the linking algorithm used in LLVM <= 3.2. The LLVM specific bitcode archive format has been removed from LLVM >= 3.3 . Now archives are normal system archives that can contain LLVM bitcode modules as well as regular binary object files. The previous commit implemented an approach where ALL the bitcode modules get linked in which can be terribly slow when klee-uclibc gets linked (~600 LLVM modules). Here are the options that I considered to address this: * Use LD with LLVM gold plug-in and call as an external program. I Don't really want to add another dependency to KLEE. It already has enough! * Use the upcomming LLVM linker (lld). Not really an option because at the time of writing there is no support for linking archives of bitcode modules. * Don't use archives at all and just work with modules (i.e. replace uses of llvm-ar with llvm-link and tinker with the flags a little). This isn't so great because the resulting LLVM bitcode module we execute is bigger than it should be. * Reimpelent bitcode archive linking ourselves in a slightly better way. I've gone for the last option This implementation unfortunately loads all bitcode modules into memory first so we can query the module symbols tables. I would prefer to read the archive's index and link in modules on demand but unfortunately although the new Object::Archive interface in LLVM allows iteration over symbols it doesn't provide a way of knowing if that symbol is defined/undefined. This implementation is far from perfect!
2014-02-06Add support for archive and single bc file linkingMartin Nowack
With LLVM 3.3 the linker does not support reading of archive files directly. This brings the support back (based on llvm-mn). Furthermore, linking single bc files or archives with bc and object files mixed is supported as well.
2014-02-04Explicitly propagate CPLUS_INCLUDE_PATH and C_INCLUDE_PATH environmentDan Liew
variables in llvm-lit. This should hopefully fix the build bot. The propagation of environmental variables was also slightly refactored.
2014-02-04Merge pull request #101 from delcypher/fix_isatty_llvm33Cristian Cadar
Fix Runtime/POSIX/Isatty.c test under LLVM3.3.
2014-01-29Fix Runtime/POSIX/Isatty.c test under LLVM3.3. The program makesDan Liew
a call fprintf(stderr,...). llvm-gcc transforms this to a call to fwrite() however clang does not so klee-uclibc's fprintf will be called instead and if klee-uclibc is compiled with KLEE_SYM_PRINTF then output will always go stdout if the FILE is stdout or stderr. The end result of this is that when we build with Clang under LLVM3.3 is that the fprintf(stderr,...) print outs go to standard output instead and so the test would fail because it expects the fprintf(stderr,...) to be on stderr. This test sort of fixes this by having the test check stdout for the fprintf(stderr,...) statements too.
2014-01-28Allow passing arbitrary command line flags to klee and kleaverDan Liew
when running llvm-lit. This is done by doing something like $ cd test/ $ llvm-lit --param klee_opts=--xxx --param kleaver_opts=--yyy . This would pass "--xxx" as an extra option to KLEE when running tests and would pass "--yyy" as an extra option to kleaver when running tests. This feature has been added to make it easy to pass different flags to KLEE or Kleaver without needing to modify tests or recompile KLEE with different defaults (yuck!).
2014-01-25Upstream STP's libstp now depends on boost. This commit updatesDan Liew
the configure script to detect this by first trying to link without boost and if that fails then trying to link libstp with boost. This also updates the relevant Makefiles so that the klee and kleaver executables link in STP's boost dependencies if necessary.
2014-01-21Merge pull request #92 from delcypher/fix_llvm-litCristian Cadar
Move testing infrastructure to llvm-lit and completly remove all DejaGNU support
2014-01-20Hide make check command unless using VERBOSE make variable.Dan Liew
e.g. $ make check VERBOSE=1 # Shows command and shows more detail $ make check # Does not show command and shows summary
2014-01-20Explicitly use only one thread when invoking llvm-lit in TestRunner.shDan Liew
We need to fix the test suite so we can run it in parallel.
2014-01-20Fixed test cases that fail if using an in-source buildDan Liew
2014-01-20Only run klee-uclibc tests if KLEE was configured with klee-uclibcDan Liew
support.
2014-01-20Partially fix python detection for running llvm-lit.Dan Liew
The problem is newer LLVM versions (e.g. 3.3) detect python at their configure time whereas older versions don't (i.e. 2.9). So I don't want to add python detection to KLEE's configure if LLVM already does the work for us. We need to move off llvm 2.9 anyway.
2014-01-20Remove the last remnants (I think) of DejaGNU. Goodbye!Dan Liew
Say hello to our new friend, llvm-lit :)
2014-01-20Give absolute paths to KLEE's tools in lit.cfg . This fixes a longDan Liew
standing FIXME:
2014-01-20Only run SELinux test if support for SELinux was detected at configureDan Liew
time.
2014-01-20Added Runtime/POSIX/lit.local.cfg file that prevents the POSIXDan Liew
tests from being executed if not enabled at configure time.
2014-01-20Fixed tests where llvm-gcc was called without the -emit-llvm flag.Dan Liew
DejaGNU testing used to have this flag in its substitution variable but for llvm-lit this has not been done. I could replicate what DejaGNU did but by forcing developers to be explicit when creating LLVM bitcode * Remove test suite inconsistentcies. Some tests explictly use -emit-llvm * Allows for tests to be written in the future that invoke the compiler as a native compiler
2014-01-20Add lit.local.cfg file for test/Concrete so no tests are executedDan Liew
in this directory. I don't know why these tests are here, they weren't executed before by DejaGNU.
2014-01-20* Do not ignore lit.local.cfg files needed for llvm-litDan Liew
* Ignore lit.site.cfg file.
2014-01-20Removed all of llvm-lit's dependence on DejaGNU. A few thingsDan Liew
are now broken and will be fixed shortly.
2014-01-20Fixed Feature/InAndOutOfBounds.c so it did not make use of ! whichDan Liew
seemed to causing problems for llvm-lit's parser.
2014-01-20Force python2 to be used when running llvm-lit. This needs to be fixedDan Liew
properly at configure time at some point.
2014-01-20Fix Feature/Envp.c test for llvm-lit by providing the PWD environmental variableDan Liew
in test environment.
2014-01-20Fixed Feature/LongDouble.cpp test for llvm-lit by removed use ofDan Liew
{ } quotes. I also add FileCheck lines but I've not added running FileCheck because only new versions of FileCheck support the CHECK-DAG: syntax.
2014-01-20Fixed many tests that make use of the file tool to checkDan Liew
a file created by KLEE exists. A big difference between DejaGNU and llvm-lit is that in DejaGNU the working directory is the test output directory (e.g. test/Feature/Output) but in llvm-lit the working directory is the test directory (e.g. test/Feature ) To fix this I have used the %T substitution variable for llvm-lit. I have also improved some tests by using LLVM's FileCheck tool and removing of hard coded constants for data type size in some places. This commit inevitably breaks running the tests under DejaGNU. Although it is possible to hack by introducing the %T substitution variable some tests would still be broken because the use of shell pipes in DejaGNU doesn't seem to work properly. I could work around this but it's really not worth the effort.
2014-01-20Allow llvm-lit from 2.9 to work by hacking %T substitution variable.Dan Liew
2014-01-20Put llvm tools directory at beginning of PATH list so that the LLVMDan Liew
version that KLEE and llvm-as use is the same.
2014-01-20Add LLVM tool directory to PATH when running tests with llvm-lit.Dan Liew
This is needed because the helper tool 'not' is used by some tests
2014-01-20Fixed Expr/Parser/Simplify.pc test for llvm-lit. Escaped quote issue.Dan Liew
2014-01-20Fixed Expr/Parser/MultiByteReads.pc test.Dan Liew