summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-07-20[libFuzzer] Use separate test directory for each configJoel E. Denny
Previously, check-all failed many tests for me. It was running the X86_64DefaultLinuxConfig, X86_64LibcxxLinuxConfig, and X86_64StaticLibcxxLinuxConfig configs out of llvm-build/projects/compiler-rt/test/fuzzer. Now, it runs them out of separate subdirectories there, and most tests pass. Reviewed By: morehouse, george.karpenkov Differential Revision: https://reviews.llvm.org/D49249 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337521 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[libFuzzer] when -print_coverage=1 is given, print more stats (the number of ↵Kostya Serebryany
seeds that hit every given function) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337501 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[profile] Fix typo in testTeresa Johnson
Noticed that this was causing a compiler warning in the test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337493 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[profile] Add interface to get profile filenameTeresa Johnson
Summary: Add __llvm_profile_get_filename interface to get the profile filename, which can be used for identifying which profile file belongs to an app when multiple binaries are instrumented and dumping profiles into the same directory. The filename includes the path. Reviewers: davidxl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49529 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337482 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[compiler-rt] Only set lto_flags if lto_supportedTeresa Johnson
Fix bot failure from r37465. Move the new lto_flags append under the check for whether lto_supported. Otherwise TestingConfig may not have that member. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337467 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[compiler-rt] Add NewPM testing to CFI testsTeresa Johnson
Summary: Executes both LTO and ThinLTO CFI tests an additional time using the new pass manager. I only bothered to add with gold and not lld as testing with one linker should be sufficient. I didn't add for APPLE or WIN32 since I don't have a way to test those. Depends on D49429. Reviewers: pcc Subscribers: dberris, mgorny, mehdi_amini, delcypher, dexonsmith, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49432 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337465 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[XRay][compiler-rt] Profiling: No files when emptyDean Michael Berris
This change makes it so that the profiling mode implementation will only write files when there are buffers to write. Before this change, we'd always open a file even if there were no profiles collected when flushing. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337443 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[libFuzzer] quick hack to fix the botKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337436 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[libFuzzer] first experimental attempt at DFT-based mutations ↵Kostya Serebryany
(DFT=data-flow-trace) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337434 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19Remove scheduling dependency from XRay :: Posix/fork_basic_logging.ccMatthew Voss
Summary: We've been seeing intermittent failures on our internal bots and we suspect this may be due to the OS scheduling the child process to run before the parent process. This version ensures that the parent and child can be run in either order. Reviewers: Maknee, dberris Reviewed By: dberris Subscribers: delcypher, #sanitizers, Maknee, llvm-commits Differential Revision: https://reviews.llvm.org/D49501 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337432 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18Rename __asan_gen_* symbols to ___asan_gen_*.Peter Collingbourne
This prevents gold from printing a warning when trying to export these symbols via the asan dynamic list after ThinLTO promotes them from private symbols to external symbols with hidden visibility. Differential Revision: https://reviews.llvm.org/D49498 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337428 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[XRay][compiler-rt] FDR Mode: Allow multiple runsDean Michael Berris
Summary: Fix a bug in FDR mode which didn't allow for re-initialising the logging in the same process. This change ensures that: - When we flush the FDR mode logging, that the state of the logging implementation is `XRAY_LOG_UNINITIALIZED`. - Fix up the thread-local initialisation to use aligned storage and `pthread_getspecific` as well as `pthread_setspecific` for the thread-specific data. - Actually use the pointer provided to the thread-exit cleanup handling, instead of assuming that the thread has thread-local data associated with it, and reaching at thread-exit time. In this change we also have an explicit test for two consecutive sessions for FDR mode tracing, and ensuring both sessions succeed. Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49359 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337341 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17[libFuzzer] Mutation tracking and logging implemented.Max Moroz
Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337324 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17libFuzzer: prevent irrelevant strings from leaking into auto-dictionaryMatt Morehouse
This is a fix for bug 37047. https://bugs.llvm.org/show_bug.cgi?id=37047 Implemented by basically reversing the logic. Previously all strings were considered, with some operations excluded. Now strings are excluded by default, and only strings during the CB considered. Patch By: pdknsk Differential Revision: https://reviews.llvm.org/D48800 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337296 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Avoid STL in MSan test.Matt Morehouse
Summary: STL can cause MSan false positives if lib[std]c++ isn't instrumented with MSan. Reviewers: kcc Reviewed By: kcc Subscribers: Dor1s, llvm-commits Differential Revision: https://reviews.llvm.org/D49404 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337224 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Revert r337194 (https://reviews.llvm.org/D48891) due to compilation errors.Max Moroz
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337206 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[cmake][libFuzzer] fixup r337193 to ensure msan/dfsan are not addedAlex Lorenz
to test deps for libfuzzer when they're not supported by the platform git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337203 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Mutation tracking and logging implemented.Max Moroz
Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337194 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Add msan and dfsan to test deps.Matt Morehouse
Required now that we have tests using MSan and DFSan. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337193 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz
unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337187 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Revert r337175 (https://reviews.llvm.org/D49212) due to unintentional format ↵Max Moroz
changes. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337180 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz
unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337175 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[gcov] Add a test showing differences in line counts when building with or ↵Marco Castelluccio
without exceptions enabled. Test for https://bugs.llvm.org/show_bug.cgi?id=38066. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337174 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Add a test with __gcov_flush called before terminating the program.Marco Castelluccio
Test for https://bugs.llvm.org/show_bug.cgi?id=38067. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337150 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[UBSan] Followup for silence_unsigned_overflow flag to handle negate overflows.Max Moroz
Summary: That flag has been introduced in https://reviews.llvm.org/D48660 for suppressing UIO error messages in an efficient way. The main motivation is to be able to use UIO checks in builds used for fuzzing as it might provide an interesting signal to a fuzzing engine such as libFuzzer. See https://github.com/google/oss-fuzz/issues/910 for more information. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49324 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337068 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13Add a test with multiple BBs on the same lineMarco Castelluccio
Test for https://bugs.llvm.org/show_bug.cgi?id=38065. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336996 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13Remove `tsan/Darwin/gcd-after-null.mm` test.Dan Liew
Summary: This test invokes undocumented behaviour that could change in the future. Given this, it's probably best to just remove the test. rdar://problem/42022283 Reviewers: kubamracek Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49269 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336977 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata ↵Dean Michael Berris
record entry in FDR mode Summary: llvm-xray changes: - account-mode - process-id {...} shows after thread-id - convert-mode - process {...} shows after thread - parses FDR and basic mode pid entries - Checks version number for FDR log parsing. Basic logging changes: - Update header version from 2 -> 3 FDR logging changes: - Update header version from 2 -> 3 - in writeBufferPreamble, there is an additional PID Metadata record (after thread id record and tsc record) Test cases changes: - fdr-mode.cc, fdr-single-thread.cc, fdr-thread-order.cc modified to catch process id output in the log. Reviewers: dberris Reviewed By: dberris Subscribers: hiraditya, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49153 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336974 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[XRay][compiler-rt] Profiling Mode: Flush logs on exitDean Michael Berris
Summary: This change adds support for writing out profiles at program exit. Depends on D48653. Reviewers: kpw, eizan Reviewed By: kpw Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48956 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336969 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[fuzzer] [tests] Increase the number of iterations for three-bytes.testGeorge Karpenkov
The test is flaky otherwise on some of our macOS machines in the test fleet. Differential Revision: https://reviews.llvm.org/D49277 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336966 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12Simplify instrprof-dlopen-dlclose-gcov.test to avoid failures on Aarch64.Marco Castelluccio
The test for a function with an if block in a single line (https://bugs.llvm.org/show_bug.cgi?id=38065) will be moved to a separate test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336942 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12[SanitizerCoverage] Add associated metadata to 8-bit counters.Matt Morehouse
Summary: This allows counters associated with unused functions to be dead-stripped along with their functions. This approach is the same one we used for PC tables. Fixes an issue where LLD removes an unused PC table but leaves the 8-bit counter. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, hiraditya, kcc Differential Revision: https://reviews.llvm.org/D49264 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336941 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12[libFuzzer] If LLD available, require it to build first.Matt Morehouse
Since we now have a test that requires LLD, make sure it is built before that test runs. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336932 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12[libFuzzer] Use lld-available for gc-sections.test.Matt Morehouse
The lld feature is never available for libFuzzer tests, so gc-sections.test never actually runs. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336926 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12[XRay][compiler-rt] Fixup: require x86_64 for profiling mode testsDean Michael Berris
This constrains the build environments we are testing/supporting for the runtime tests until we can be sure xray works in more platforms. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336878 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[FileCheck] Add -allow-deprecated-dag-overlap to another compiler-rt testJoel E. Denny
See https://reviews.llvm.org/D47106 for details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336859 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[FileCheck] Add -allow-deprecated-dag-overlap to failing compiler-rt testsJoel E. Denny
See https://reviews.llvm.org/D47106 for details. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47326 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336845 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Remove ppc64 BE XFAILs now that gcov profiling works, after starting a cleanZaara Syeda
build this time. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336839 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Link to the correct bug number about the Mac failure for ↵Marco Castelluccio
instrprof-shared-gcov-flush.test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336820 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Revert 336811, there are still some problems with the tests.Zaara Syeda
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336819 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Remove ppc64 BE XFAILs now that gcov profiling works.Zaara Syeda
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336811 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[XRay] basic mode PID and TID always fetchDean Michael Berris
Summary: XRayRecords now includes a PID field. Basic handlers fetch pid and tid each time they are called instead of caching the value. Added a testcase that calls fork and checks if the child TID is different from the parent TID to verify that the processes' TID are different in the trace. Reviewers: dberris, Maknee Reviewed By: dberris, Maknee Subscribers: kpw, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49025 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336769 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[libFuzzer] Disable dataflow.test on AArch64.Matt Morehouse
Summary: After my recent change to allow MSan + libFuzzer, the ExplodeDFSanLabelsTest.cpp test started to overflow the stack with recursive function SetBytesForLabel() on an AArch64 bot. Perhaps that bot has a smaller stack size, or maybe AArch64 has larger stack frames for this particular function. Reviewers: kcc, javed.absar Reviewed By: kcc Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D49150 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336725 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10Revert "[Fuzzer] Afl driver changing iterations handling"Matt Morehouse
This reverts rL334510 due to breakage of afl_driver's command line interface. Patch By: Jonathan Metzman Differential Revision: https://reviews.llvm.org/D49141 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336719 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10Limit ASan non-executable-pc test case to x86 botsVlad Tsyrklevich
The test case fails on the big-endian PPC bot, probably because PowerPC uses function descriptors. More over other architectures don't support NX mappings. (This test case was not being exercised prior to r336633.) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336714 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[asan] Disable non-execute test on s390Ulrich Weigand
Processors before z14 don't support non-execute protection, so they will start execution random memory contents, causing the test to randomly fail or succeed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336705 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10Remove s390x XFAILs now that gcov profiling works.Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336695 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10Reapply "Make __gcov_flush flush counters for all shared libraries"Marco Castelluccio
This reapplies r336365, after marking tests as failing on various configurations. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336678 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[scudo] Use mkdir -p when creating directories for a testFilipe Cabecinhas
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336673 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[LibFuzzer] Disable MSan test on Darwin which was added by r336619. The ↵Dan Liew
MemorySanitizer is not supported on Darwin currently and so Clang refuses to compile with `-fsanitize=memory`. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336669 91177308-0d34-0410-b5e6-96231b3b80d8