summaryrefslogtreecommitdiff
path: root/test/cfi/lit.cfg
AgeCommit message (Collapse)Author
2017-12-01[ubsan] Re-commit: lit changes for lld testing, future lto testing.Roman Lebedev
Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. The original attempt, r319525 was reverted in r319526 due to the failures in compiler-rt standalone builds. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319575 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01Revert "[ubsan] lit changes for lld testing, future lto testing."Roman Lebedev
This reverts commit r319525. This change has introduced a problem with the Lit tests build for compiler-rt using Gold: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/6047/steps/test%20standalone%20compiler-rt/logs/stdio llvm-lit: /b/sanitizer-x86_64-linux/build/llvm/utils/lit/lit/TestingConfig.py:101: fatal: unable to parse config file '/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg', traceback: Traceback (most recent call last): File "/b/sanitizer-x86_64-linux/build/llvm/utils/lit/lit/TestingConfig.py", line 88, in load_from_path exec(compile(data, path, 'exec'), cfg_globals, None) File "/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg", line 37, in <module> if root.host_os not in ['Linux'] or not is_gold_linker_available(): File "/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg", line 27, in is_gold_linker_available stderr = subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 390, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319529 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01[ubsan] lit changes for lld testing, future lto testing.Roman Lebedev
Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319525 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17Enable PDB generation with lld in asan and cfi tests on Windows.Peter Collingbourne
PDB emission now works well enough that we can rely on it for these tests to pass. Differential Revision: https://reviews.llvm.org/D40188 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-16[cfi] Test cross-dso CFI on Android.Evgeniy Stepanov
Reviewers: vitalybuka, pcc Subscribers: llvm-commits, srhines Differential Revision: https://reviews.llvm.org/D38911 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315922 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-06[sanitizer] Test ubsan and cfi on android.Evgeniy Stepanov
Summary: Enable check-cfi and check-ubsan on Android. Check-ubsan includes standalone and ubsan+asan, but not tsan or msan. Cross-dso cfi tests are disabled for now. Reviewers: vitalybuka, pcc Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38608 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05[cfi] Test on all available targets.Evgeniy Stepanov
Summary: Run CFI tests on all targets current toolchain can target. On multiarch Linux, this will run all CFI tests with -m32 and -m64. Reviewers: pcc Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38572 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[cfi] Run tests with and without lld and thinlto.Evgeniy Stepanov
Run tests in all configurations: (standalone, with devirtualization) * (gold, lld) * (lto, thinlto) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25cfi: Start testing CFI in both standalone and devirtualization modes.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D21123 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28Update visibility flags for CFI tests.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D18813 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-24[tests] Don't compile CFI C tests in C++ mode.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261708 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15Cross-DSO control flow integrity (compiler-rt part).Evgeniy Stepanov
This is an initial version of the runtime cross-DSO CFI support library. It contains a number of FIXMEs, ex. it does not support the diagnostic mode nor dlopen/dlclose, but it works and can be tested. Diagnostic mode, in particular, would require some refactoring (we'd like to gather all CFI hooks in the UBSan library into one function so that we could easier pass the diagnostic information down to __cfi_check). It will be implemented later. Once the diagnostic mode is in, I plan to create a second test configuration to run all existing tests in both modes. For now, this patch includes only a few new cross-DSO tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20Re-enable CFI tests on Windows.Peter Collingbourne
Clang driver was fixed in r253707. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253712 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20Disable the cfi tests on WindowsHans Wennborg
They are currently broken and there seems to be no bot coverage for this configuration so it's essentially unspported. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253673 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-10CFI: Add diagnostic handler and tests for indirect call checker.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D11858 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247239 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-06-19Add -flto to clang flags for cfi tests.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19Add control flow integrity diagnosis function to UBSan runtime library.Peter Collingbourne
Also includes execution tests for the feature. Differential Revision: http://reviews.llvm.org/D10269 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-19Factor out LTO detection to common configuration.Peter Collingbourne
This will allow us to test other sanitizers with LTO. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237747 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25CFI: Add a check-cfi-and-supported rule.Peter Collingbourne
This rule works like check-cfi, but fails if the tests are unsupported. This is useful to run on bots if we want to be sure that the tests aren't silently being skipped. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230536 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