summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
AgeCommit message (Collapse)Author
2017-11-13Allow compiler-rt test targets to work with multi-config CMake generatorsGreg Bedwell
Multi-config CMake generators need lit to be able to resolve paths of artifacts from previous build steps at lit time, rather than expect them to be fully resolved at CMake time as they may contain the build mode. Differential Revision: https://reviews.llvm.org/D38471 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318037 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-02[cmake] Add a separate CMake var to control profile runtimeMichal Gorny
Make it possible to control building profile runtime separately from other options. Before r313549, the profile runtime building was controlled along with sanitizers. However, since that commit it is built unconditionally which results in multiple builds for people building different runtimes separately. Differential Revision: https://reviews.llvm.org/D38441 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314646 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[cmake] Make it possible to build and test profile without sanitizersVedant Kumar
This should fix an issue which arises when running check-compiler-rt on the coverage bot: http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1590/ The bot doesn't build the sanitizers, but the check-compiler-rt target always expects the profile runtime to exist. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313549 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16[asan] Enable asan_and_llvm_coverage_test.cc on AndroidVitaly Buka
Test just needs profile. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313438 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31Revert "[ubsan] Make check-ubsan depend on check-ubsan-minimal."Evgeniy Stepanov
Breaks buildbot with CMake Error at projects/compiler-rt/test/CMakeLists.txt:76 (add_dependencies): The dependency target "check-ubsan-minimal" of target "check-ubsan" does not exist. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312295 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31[ubsan] Make check-ubsan depend on check-ubsan-minimal.Evgeniy Stepanov
Summary: This way we don't need to add check-ubsan-minimal steps to all the bots. Reviewers: vitalybuka Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D37350 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312291 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-30[fuzzer] Don't enable tests when the fuzzer isn't builtVedant Kumar
Should fix: http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1527 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21Move libFuzzer to compiler_rt.George Karpenkov
Resulting library binaries will be named libclang_rt.fuzzer*, and will be placed in Clang toolchain, allowing redistribution. Differential Revision: https://reviews.llvm.org/D36908 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311407 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Don't double-include cfi tests on linuxFrancis Ricci
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306455 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Loop directly over sanitizers to build in cmakeFrancis Ricci
Summary: Cleaner than computing the intersection for each possible sanitizer Reviewers: compnerd, beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34693 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306453 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is usedFrancis Ricci
Summary: This allows check-all to be used when only a subset of the sanitizers are built. Reviewers: beanz, compnerd, rnk, pcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34644 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306450 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Revert "Only test sanitizers that are built when ↵Francis Ricci
COMPILER_RT_SANITIZERS_TO_BUILD is used" This breaks cfi testing in cases when the cfi runtime isn't built. This reverts commit 1c6a7b07545f0c9ce68e8b226f5397694ce48af7. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306431 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is usedFrancis Ricci
Summary: This allows check-all to be used when only a subset of the sanitizers are built. Reviewers: beanz, compnerd Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34644 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306415 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26[test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is onMichal Gorny
Cover the sanitizer tests with COMPILER_RT_BUILD_SANITIZERS conditional, and add COMPILER_RT_BUILD_XRAY conditional to the xray tests. This makes it possible to do a pure-builtins build with tests enabled. Differential Revision: https://reviews.llvm.org/D32489 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09Reapply r297382: "[compiler-rt][builtins] Add __isOSVersionAtLeast()"Erik Pilkington
Looks like the problem was a case-insensitive include of dispatch/dispatch.h. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297392 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09Revert "[compiler-rt][builtins] Add __isOSVersionAtLeast()"Erik Pilkington
This reverts r297382, it was causing build failures. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297388 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09[compiler-rt][builtins] Add __isOSVersionAtLeast()Erik Pilkington
This predicate compares the host's marketing OS version to one passed as argument. Currently, only darwin targets are supported. This is done by parsing the SystemVersion.plist file. Also added in this patch is some lit testing infrastructure for builtins, which previously had none. This part of the patch was written by Alex Lorenz (with some minor modifications). This patch is part of a feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential revision: https://reviews.llvm.org/D30136 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14[asan/win] Delay load dbghelp.dll to delay ucrtbase.dll initializationReid Kleckner
Summary: ASan needs to initialize before ucrtbase.dll so that it can intercept all of its heap allocations. New versions of dbghelp.dll depend on ucrtbase.dll, which means both of those DLLs will initialize before the dynamic ASan runtime. By lazily loading dbghelp.dll with LoadLibrary, we avoid the issue. Eventually, I would like to remove our dbghelp.dll dependency in favor of always using llvm-symbolizer.exe, but this seems like an acceptable interim solution. Fixes PR30903 Reviewers: etienneb Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D26473 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@286848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-01[CMake] Adding compiler-rt-test-depends targetChris Bieneman
This exposes a target for building the compiler-rt test dependencies and matches llvm-test-depends. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-19[CMake] Add check-compiler-rt target for runtimes buildChris Bieneman
Durning standalone builds (which includes runtimes builds) we want to create a target named check-compiler-rt. Additionally we also create check-all if it doesn't already exist as a convienence target that depends on check-compiler-rt. This allows us to generate a single check target that invokes lit for all test suites in the runtimes projects, while avoiding name collision of check-all and not breaking existing workflows. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08[compiler-rt][XRay] Implement __xray_unpatch() and __xray_remove_handler()Dean Michael Berris
Summary: We also add one test (and the XRay testing infrastructure) to exercise the patching and unpatching code. This uses the XRay API exported through the headers as well, installing a custom log handler. Depends on D23101 for the updated emitted code alignment for the return/entry sleds. Reviewers: rSerge, echristo, rnk Subscribers: tberghammer, danalbert, srhines, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23154 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-27[compiler-rt] Activate interception unittestsEtienne Bergeron
Summary: The unittests recently added were not running when executing 'check-all'. Tests are stable on every archictetures and we can now turn them on. Reviewers: rnk Subscribers: llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22695 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07[sanitizer] Initial implementation of a Hardened AllocatorKostya Serebryany
Summary: This is an initial implementation of a Hardened Allocator based on Sanitizer Common's CombinedAllocator. It aims at mitigating heap based vulnerabilities by adding several features to the base allocator, while staying relatively fast. The following were implemented: - additional consistency checks on the allocation function parameters and on the heap chunks; - use of checksum protected chunk header, to detect corruption; - randomness to the allocator base; - delayed freelist (quarantine), to mitigate use after free and overall determinism. Additional mitigations are in the works. Reviewers: eugenis, aizatsky, pcc, krasin, vitalybuka, glider, dvyukov, kcc Subscribers: kubabrecka, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D20084 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21[esan] EfficiencySanitizer base runtime libraryDerek Bruening
Summary: Adds the initial version of a runtime library for the new EfficiencySanitizer ("esan") family of tools. The library includes: + Slowpath code via callouts from the compiler instrumentation for each memory access. + Registration of atexit() to call finalization code. + Runtime option flags controlled by the environment variable ESAN_OPTIONS. The common sanitizer flags are supported such as verbosity and log_path. + An initial simple test. Still TODO: common code for libc interceptors and shadow memory mapping, and tool-specific code for shadow state updating. Reviewers: eugenis, vitalybuka, aizatsky, filcab Subscribers: filcab, vkalintiris, kubabrecka, llvm-commits, zhaoqin, kcc Differential Revision: http://reviews.llvm.org/D19168 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06Another place for CMAKE_HOST_UNIXSean Silva
If we don't create the target, don't try to add it as a dependency. After r265595, we were only creating the SanitizerLintCheck when `CMAKE_HOST_UNIX` was true. CMake was emitting a warning: The dependency target "SanitizerLintCheck" of target "check-ubsan" does not exist. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265613 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17[CMake] Push the dependency on AddLLVM into the test and unites layersChris Bieneman
Compiler-rt only relies on LLVM for lit support. Pushing this dependency down into the test and unitest layers will allow builtin libraries to be built without LLVM. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[sanitizers] generating html report on coverage dumpMike Aizatsky
Subscribers: tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D16374 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08Revert "Fix CMake warning in CFI tests."Evgeniy Stepanov
This is a bit more complex than that. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08Fix CMake warning in CFI tests.Evgeniy Stepanov
Fix incorrect condition for enabling the CFI tests. This removes the following CMake warnings on Windows: The dependency target "cfi" of target "check-all" does not exist. The dependency target "cfi" of target "check-cfi-and-supported" does not exist. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257199 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10Revert "[CMake] Provide options for toggling on and off various runtime ↵Chris Bieneman
libraries." This reverts r255170. This change caused a bunch of bot failures and needs to be revised. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255184 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09[CMake] Provide options for toggling on and off various runtime libraries.Chris Bieneman
Summary: Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them. The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off. Reviewers: kubabrecka, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14846 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07[TSan] Use llvm-objdump+FileCheck instead of standalone .sh script.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254959 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-29[CFI] Make CFI tests require UBSan (for diagnostic mode).Alexey Samsonov
CFI itself, on the other hand, doesn't require anything, including sanitizer_common. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-29CFI: Update tests for various bit vector sizes following lowerbitsets optzns.Peter Collingbourne
Also add a test to ensure that this doesn't regress. Differential Revision: http://reviews.llvm.org/D11584 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243547 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-02UBSan: Enable runtime library tests on Windows, and get most tests passing.Peter Collingbourne
Specifically: - Disable int128 tests on Windows, as MSVC cl.exe does not support int128, so we might not have been able to build the runtime with int128 support. - XFAIL the vptr tests as we lack Microsoft ABI support. - XFAIL enum.cpp as UBSan fails to add the correct instrumentation code for some reason. - Modify certain tests that build executables multiple times to use unique names for each executable. This works around a race condition observed on Windows. - Implement IsAccessibleMemoryRange for Windows to fix the last misaligned.cpp test. - Introduce a substitution for testing crashes on Windows using KillTheDoctor. Differential Revision: http://reviews.llvm.org/D10864 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241303 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-15Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne
compiler-rt runtime support library This patch adds runtime support for the Safe Stack protection to compiler-rt (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of compiler-rt. The patch adds basic runtime support for the safe stack to compiler-rt that manages unsafe stack allocation/deallocation for each thread. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6096 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239763 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20Add test suite for the Control Flow Integrity feature.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D7738 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230056 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20Make FileCheck be a common dependency, not an ASan one.Filipe Cabecinhas
Summary: It still gets picked up by ASan, but it also gets picked up by the other test suites. Otherwise, some test suites (e.g: UBSan) would complain they had no dependencies, and wouldn't run. Reviewers: samsonov, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7740 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229962 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-21Don't make check-sanitizer depend on profile on WindowsReid Kleckner
We don't build the profiling library on Windows, so CMake warns that the target doesn't exist. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222588 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-24[asan] make sanitizer tests depend on libclang_rt.profile since we now have ↵Kostya Serebryany
a test that uses -coverage git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218427 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-08[CMake] Determine which compiler-rt libraries are supported onAlexey Samsonov
a given platform in a top-level CMakeLists.txt to use it both in lib/ and in test/ subdirectories. Move architecture/platform checks to config-ix. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215247 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-31InstrProf: Add simple compiler-rt testDuncan P. N. Exon Smith
Add the test infrastructure for testing lib/profile and a single test. This initial commit only enables the tests on Darwin, but they'll be enabled on Linux soon after. <rdar://problem/16458307> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205256 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20[CMake] Introduce check-all command for standalone compiler-rt buildAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201780 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20Move config for sanitizer_common tests under test/ for consistencyAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201779 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Add the way to run tests in standalone build.Alexey Samsonov
1) Depend on llvm-config (configured in LLVM_CONFIG_PATH) to get necessary LLVM source/binary directories. 2) Add basic support for running lit tests (check-xsan commands). For now this "support" is far from what we want: * unit tests are not built currently. * lit tests use Clang/compiler-rt from LLVM build directory, not the host compiler or just-built compiler-rt libraries. We should make a choice on the way we intend ti run compiler-rt lit testsuite: a) use either Clang from LLVM build tree, or the host compiler. b) use either just-built runtimes, or the runtimes shipped with the host compiler. Using just-built runtimes is tricky - we have to know where to put them, so that Clang/GCC driver would pick them up (and not overwrite the existing runtimes). Using a host compiler instead of Clang from LLVM build tree will give us a chance to run lit tests under GCC (which already has support for several sanitizers). That is, I tend to make the following choice: if we're in a standalone compiler-rt build, use host compiler with its set of runtime libraries to run lit tests. This will effectively decouple "make compiler-rt" and "make check-compiler-rt" in a standalone build - the latter wouldn't invoke the former. Note that if we decide to fix LLVM/Clang/compiler-rt build system so that it would configure/build compiler-rt with just-built Clang (as we do in Makefile-based build), this will not be a problem - we can add a dependency to ensure that clang/compiler-rt are rebuilt before running compiler-rt tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201656 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Simplify setting compile flag disabling RTTIAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201547 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14[ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201417 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move TSan lit-tests under test/tsanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201414 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move ASan lit-tests under test/asanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201413 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move MSan lit-tests under test/msanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201412 91177308-0d34-0410-b5e6-96231b3b80d8