summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/TestCases
Commit message (Collapse)AuthorAgeFilesLines
...
* Add interceptors for the md4(3) from NetBSDKamil Rytarowski2018-12-081-0/+114
| | | | | | | | | | | | | | | | | | | | Summary: MD4Init, MD4Update, MD4Final, MD4End, MD4File, MD4Data - calculates the RSA Data Security, Inc., "MD4" message digest. Add dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54990 llvm-svn: 348677
* Add interceptors for the sha1(3) from NetBSDKamil Rytarowski2018-12-081-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for: - SHA1Init - SHA1Update - SHA1Final - SHA1Transform - SHA1End - SHA1File - SHA1FileChunk - SHA1Data Add a dedicated regression test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54927 llvm-svn: 348676
* [sanitizer] Add lit.local.cfg for FreeBSDVitaly Buka2018-12-081-0/+9
| | | | llvm-svn: 348674
* Conflict fixes from previous commits.David Carlier2018-12-081-0/+48
| | | | llvm-svn: 348669
* [Sanitizer] capsicum api subset interceptionDavid Carlier2018-12-081-0/+48
| | | | | | | | | | | | - For the moment a subset of this api dealing with file descriptors permissions and ioctls. Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D55368 llvm-svn: 348668
* Add interceptors for the strtoi(3)/strtou(3) from NetBSDKamil Rytarowski2018-12-071-0/+43
| | | | | | | | | | | | | | | | | | | | | | | Summary: strtoi/strtou converts string value to an intmax_t/uintmax_t integer. Add a dedicated test. Enable this API for NetBSD. It's a reworked version of the original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, tomsun.0.7, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54702 llvm-svn: 348663
* Add a new interceptors for statvfs1(2) and fstatvfs1(2) from NetBSDKamil Rytarowski2018-12-071-0/+58
| | | | | | | | | | | | | | | | | | | | | Summary: statvfs1, fstatvfs1 - get file system statistics. While there, use file descriptor related macros in the fstatvfs interceptor. Add a dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: dvyukov, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55031 llvm-svn: 348656
* Add a new interceptor for fparseln(3) from NetBSDKamil Rytarowski2018-12-071-0/+25
| | | | | | | | | | | | | | | | | | | Summary: fparseln - returns the next logical line from a stream. Add a dedicated test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55019 llvm-svn: 348654
* Add new interceptor for strtonum(3)Kamil Rytarowski2018-12-071-0/+52
| | | | | | | | | | | | | | | | | | | | | | | Summary: strtonum(3) reliably convertss string value to an integer. This function is used in OpenBSD compat namespace and is located inside NetBSD's libc. Add a dedicated test for this interface. It's a reworked version of the original code by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54527 llvm-svn: 348651
* [Sanitizer] getmntinfo support in FreeBSDDavid Carlier2018-12-061-0/+10
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55354 llvm-svn: 348500
* Remove XFAIL in get_module_and_offset_for_pc.cc for NetBSD-MSanKamil Rytarowski2018-12-051-1/+0
| | | | | | | After updating GET_LINK_MAP_BY_DLOPEN_HANDLE() for recent NetBSD this test no longer fails. llvm-svn: 348378
* [Sanitizer] expand nl_langinfo interception to FreeBSDDavid Carlier2018-12-051-0/+2
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55327 llvm-svn: 348376
* Add a new interceptor for nl_langinfo(3) from NetBSDKamil Rytarowski2018-12-051-0/+18
| | | | | | | | | | | | | | | | | | | Summary: nl_langinfo - gets locale information. Add a dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55015 llvm-svn: 348369
* Fix sanitizer unit testDavid Carlier2018-12-041-1/+1
| | | | llvm-svn: 348297
* [Sanitizer] intercept part of sysctl ApiDavid Carlier2018-12-041-18/+29
| | | | | | | | | | | | | - Distringuish what FreeBSD/NetBSD can and NetBSD specifics. - Fixing page size value collection. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55265 llvm-svn: 348293
* Add interceptors for the sysctl(3) API family from NetBSDKamil Rytarowski2018-12-041-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add new interceptors for: - sysctl - sysctlbyname - sysctlgetmibinfo - sysctlnametomib - asysctl - asysctlbyname Cover the API with a new test file TestCases/NetBSD/sysctl.cc. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: devnexen, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54076 llvm-svn: 348228
* Add interceptors for the fts(3) API family from NetBSDKamil Rytarowski2018-12-041-0/+40
| | | | | | | | | | | | | | | | | | | | | | | Summary: fts(3) is API to traverse a file hierarchy. Cover this interface with interceptors. Add a test to validate the interface reading the number of regular files in /etc. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54247 llvm-svn: 348227
* Add new interceptor for regex(3) in NetBSDKamil Rytarowski2018-12-041-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for the NetBSD style of regex(3) present inside libc: - regcomp - regexec - regerror - regfree - regnsub - regasub Add a dedicated test verifying the installed interceptors. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54584 llvm-svn: 348224
* [compiler-rt] Use "ColumnLimit: 0" instead of "clang-format off" in testsVitaly Buka2018-12-015-10/+0
| | | | | | | | | | Reviewers: eugenis, jfb Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D55152 llvm-svn: 348061
* Add a new interceptor for getvfsstat(2) from NetBSDKamil Rytarowski2018-11-301-0/+36
| | | | | | | | | | | | | | | | | | | Summary: getvfsstat - gets list of all mounted file systems. Add a dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55014 llvm-svn: 348027
* [Sanitizer] Adding setvbuf in supported platforms and other stream buffer ↵David Carlier2018-11-211-0/+14
| | | | | | | | | | | | | | | functions - Enabling setvbuf interceptions for non NetBSD platforms. - setbuf, setbuffer, setlinebuf as well. Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D54779 llvm-svn: 347426
* Revert "[Sanitizer] intercept setvbuf on other platforms where it is supported"David Carlier2018-11-201-8/+0
| | | | llvm-svn: 347358
* [Sanitizer] Unbreak non NetBSD builds.David Carlier2018-11-201-0/+2
| | | | llvm-svn: 347357
* [Sanitizer] intercept setvbuf on other platforms where it is supportedDavid Carlier2018-11-201-2/+6
| | | | | | | | | | | | Unit tests enabled only in platform tested. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski, vitalybuka Differential Revision: https://reviews.llvm.org/D54739 llvm-svn: 347355
* Add interceptor for the setvbuf(3) from NetBSDKamil Rytarowski2018-11-191-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | Summary: setvbuf(3) is a routine to setup stream buffering. Enable the interceptor for NetBSD. Add dedicated tests for setvbuf(3) and functions on top of this interface: setbuf, setbuffer, setlinebuf. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: devnexen, tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54548 llvm-svn: 347270
* Add new interceptor for mi_vector_hash(3)Kamil Rytarowski2018-11-161-0/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: mi_vector_hash(3) provides fast 32bit hash functions. Add a test for this interface. Enable the API for NetBSD. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54530 llvm-svn: 347088
* Add new interceptor for getmntinfo(3) from NetBSDKamil Rytarowski2018-11-161-0/+25
| | | | | | | | | | | | | | | | | | | | | Summary: getmntinfo gets information about mounted file systems. Add a dedicated test for new interceptor. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54611 llvm-svn: 347083
* [sanitizer] Only set soft coredump limit.Evgeniy Stepanov2018-11-071-1/+1
| | | | | | | | | | | | Summary: If user wants to raise it back, let them. Reviewers: kcc, vitalybuka Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D54190 llvm-svn: 346284
* Mark breaking sanitizer_common tests on NetBSDKamil Rytarowski2018-10-304-0/+7
| | | | | | | | | | Set XFAIL with appropriate configuration for: - NetBSD/getgroupmembership - Posix/dedup_token_length_test - Posix/readlinkat - get_module_and_offset_for_pc llvm-svn: 345651
* [sanitizer] Fix mallopt test on Android.Evgeniy Stepanov2018-10-261-1/+2
| | | | | | | There is not a single common mallopt option between gnu/linux and android, so simply use a random number there. llvm-svn: 345394
* [sanitizer] Fix mallopt interceptor.Evgeniy Stepanov2018-10-251-0/+9
| | | | | | On error, mallopt is supposed to return 0, not -1. llvm-svn: 345323
* Don't harcode -ldl test/sanitizer_common/TestCasesKamil Rytarowski2018-10-083-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: The dl library does not exist on all system and in particular this breaks build on NetBSD. Make it conditional and enable only for Linux, following the approach from other test suites in the same repository. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D52994 llvm-svn: 343987
* Disable TestCases/pthread_mutexattr_get on NetBSDKamil Rytarowski2018-10-081-0/+3
| | | | | | The pshared feature is unsupported on NetBSD as of today. llvm-svn: 343981
* Fix Posix/devname_r for NetBSDKamil Rytarowski2018-10-081-0/+5
| | | | | | | | | | | | | | | | NetBSD returns a different type as a return value of devname_r(3) than FreeBSD and Darwin (int vs char*). This implies that checking for successful completion of this function has to be handled differently. This test used to work well, but was switched to fix Darwin, which broke NetBSD. Add a dedicated ifdef for NetBSD and make it functional again for this OS. llvm-svn: 343980
* [sanitizer] Include inlined frames into __sanitizer_symbolize_pc outputVitaly Buka2018-10-021-0/+32
| | | | | | | | | | | | | | | | Summary: Behavior for existing used is not changing as the first line is going to be the same, and it was invalid to try to read more lines. New clients can read until they get empty string. Reviewers: eugenis, morehouse Subscribers: kubamracek, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D52743 llvm-svn: 343605
* Revert "[sanitizer] Include inlined frames into __sanitizer_symbolize_pc output"Jessica Paquette2018-10-021-30/+0
| | | | | | | | | This reverts r343554. It was breaking some bots: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA/49997/ llvm-svn: 343600
* [sanitizer] Include inlined frames into __sanitizer_symbolize_pc outputVitaly Buka2018-10-021-0/+30
| | | | | | | | | | | | | | | | Summary: Behavior for existing used is not changing as the first line is going to be the same, and it was invalid to try to read more lines. New clients can read until they get empty string. Reviewers: eugenis, morehouse Subscribers: kubamracek, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D52743 llvm-svn: 343554
* [sanitizer] Small buffer tests for __sanitizer_symbolize_pcVitaly Buka2018-10-011-3/+20
| | | | llvm-svn: 343534
* [CMake] Use normalized Windows target triplesPetr Hosek2018-08-093-3/+3
| | | | | | | | | | | Changes the default Windows target triple returned by GetHostTriple.cmake from the old environment names (which we wanted to move away from) to newer, normalized ones. This also requires updating all tests to use the new systems names in constraints. Differential Revision: https://reviews.llvm.org/D47381 llvm-svn: 339307
* [compiler-rt] Get rid of "%T" expansionsFilipe Cabecinhas2018-07-101-2/+3
| | | | | | | | | | | | | | | | | | | Summary: Original patch by Kuba Mracek The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in compiler-rt. Differential Revision: https://reviews.llvm.org/D48618 llvm-svn: 336661
* [asan] Change 3 tests from XFAIL to UNSUPPORTED.Evgeniy Stepanov2018-06-282-2/+2
| | | | | | The failure in https://github.com/google/sanitizers/issues/981 is flaky. llvm-svn: 335941
* [asan] Disable 3 tests on Android O+.Evgeniy Stepanov2018-06-282-0/+7
| | | | | | https://github.com/google/sanitizers/issues/981 llvm-svn: 335937
* [asan] Fix one more test on Android.Evgeniy Stepanov2018-06-281-3/+5
| | | | | | | | | | This change makes it pass both on libstdc++ and libc++-based toolchains. The error was: error: function-like macro '__GLIBC_PREREQ' is not defined ^ llvm-svn: 335936
* [TSan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-184-35/+59
| | | | | | | | | | | | | | | | | | | | | | Summary: Following up on and complementing D44404 and other sanitizer allocators. Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, no stack, no details, not too helpful nor informative. To improve the situation, detailed and structured common errors were defined and reported under the appropriate conditions. Common tests were generalized a bit to cover a slightly different TSan stack reporting format, extended to verify errno value and returned pointer value check is now explicit to facilitate debugging. Reviewers: dvyukov Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48087 llvm-svn: 334975
* [ASAN] fix fgets and fgets_fputs tests failurePeter Wu2018-06-121-2/+2
| | | | | | Some systems (Android) might not have /etc/passwd. Fixes r334450. llvm-svn: 334487
* [sanitizer] Add fgets, fputs and puts into sanitizer_commonPeter Wu2018-06-112-0/+38
| | | | | | | | | | | | | | | Summary: Add fgets, fputs and puts to sanitizer_common. This adds ASAN coverage for these functions, extends MSAN support from fgets to fputs/puts and extends TSAN support from puts to fputs. Fixes: https://github.com/google/sanitizers/issues/952 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46545 llvm-svn: 334450
* [Sanitizers] %tool_options -> %env_tool_opts in allocator_returns_null.ccAlex Shlyapnikov2018-06-111-14/+14
| | | | | | Use proper substitution in the common allocator_returns_null.cc test. llvm-svn: 334438
* [Sanitizers] Move allocator_returns_null.cc test to common.Alex Shlyapnikov2018-06-111-0/+118
| | | | | | | | | | | | | | | | Summary: Add allocator_returns_null.cc test to sanitizer_common and remove all sanitizer-specific ones except: - HWASan is not covered by sanitizer_common - TSan allocator does not have comprehensive error reporting yet Reviewers: vitalybuka Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47971 llvm-svn: 334433
* [Sanitizers] Move pvalloc overflow tests to common.Alex Shlyapnikov2018-06-111-0/+46
| | | | | | | | | | | | | | | | | | | Summary: Now all sanitizers with improved allocator error reporting are covered by these common tests. Also, add pvalloc-specific checks to LSan. HWASan is not covered by sanitizer_common, hence its own pvalloc and other allocator tests. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47970 llvm-svn: 334424
* [MSan] Switch to common aligned allocs tests.Alex Shlyapnikov2018-06-092-5/+5
| | | | | | | | | | | | | | Summary: Switch to aligned_alloc and posix_memalign tests in sanitizer_common and delete the MSan-specific ones. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47968 llvm-svn: 334340
OpenPOWER on IntegriCloud