Commit Graph

25 Commits

Author SHA1 Message Date
gson
b19091917e Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
2020-11-17 08:25:57 +00:00
rin
f46f81bd9a Now, profiling works for GCC9 on aarch64{,eb}.
Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

	https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
2020-10-13 06:49:27 +00:00
martin
af1644547e Simplify test requirements: we only build tsan for amd64 currently. 2020-09-15 09:33:12 +00:00
kamil
2062795b28 Enable TSan tests for GCC and >32bit address space environments 2020-09-14 15:17:53 +00:00
riastradh
8d4c37e85f Mark compilation with -pg as xfail on aarch64.
XXX file a PR to xref
2020-02-11 06:26:19 +00:00
kamil
5612f2cac8 Define target_not_supported_body() in TSan, MSan and libFuzzer tests 2019-08-23 06:39:54 +00:00
kamil
f0720e6929 Add ATF c and c++ tests for TSan, MSan, libFuzzer
These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
2019-08-18 20:15:58 +00:00
mrg
01ef24fd3f fix hello_profile's hello_profile_head function name. 2019-02-09 02:36:28 +00:00
mrg
f4fc04f995 add $NetBSD$ tags. 2019-02-09 00:13:19 +00:00
mrg
9ca42b4c5e add very simple test that you can link -fopenmp.
currently fails, but should work soon...
2019-02-09 00:12:14 +00:00
mgorny
b4870a4524 Move common UBSAN test case code into ubsan_common.subr
Reviewed by <kamil>
2019-01-29 19:59:10 +00:00
mgorny
bf6dc715c6 Move common ASAN test case code into asan_common.subr
Reviewed by <kamil>
2019-01-29 19:56:37 +00:00
maya
f4f9a0f4e4 amend test case to also check for -fprofile-generate
(clang also supports this flag)

PR toolchain/53567
2018-09-03 21:54:57 +00:00
kamil
e77b94561b Disable profile and compat 32-bit tests cc sanitizer tests
These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
2018-07-16 07:25:58 +00:00
kamil
15009a7646 Explain VLA in t_ubsan_vla_out_of_bounds.sh (ATF test)
VLA - Variable Length Array

Requested by <martin>
2018-05-04 12:26:53 +00:00
martin
d3941ea9b2 Use more formal speech in messages 2018-05-04 10:44:24 +00:00
kamil
e308425ef5 Add new ATF Undefined Behavior Sanitizer tests
Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
 - Integer addition overflow
 - Integer divide by zero
 - Integer negation overflow
 - Integer subtraction overflow
 - VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
2018-05-02 18:46:05 +00:00
kamil
8a7b75cec0 Import new C and C++ ATF tests for ASan
Add new tests:
 - tests/usr.bin/cc/t_asan_poison.sh
 - tests/usr.bin/c++/t_asan_poison.sh

These tests verify the following build options:
 - regular
 - profile
 - pic
 - pie
 - compat32
 - (static unsupported)

These tests verify whether ASan code can include compiler and sanitizer
specific header: <sanitizer/asan_interface.h>. The testing code checks
the ASAN_POISON_MEMORY_REGION() functionality, poisoning valid memory and
asserting that it triggers expected failure.

Patch submitted by <Siddharth Muralee>
2018-04-11 03:25:25 +00:00
kamil
9f0bdbd997 Add new ATF tests for Address Sanitzier (ASan)
Add new C and C++ tests:
 - t_asan_double_free
 - t_asan_global_buffer_overflow
 - t_asan_heap_overflow
 - t_asan_off_by_one
 - t_asan_uaf

Each tests checks:
 - regular build
 - 32-bit
 - PIC
 - PIE
 - profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
2018-04-04 23:51:35 +00:00
martin
b40441be27 In the -m32 test, additionally test profiled binaries. 2017-05-31 11:08:35 +00:00
martin
4fcb013cbf Add (currently failing) test cases for profiled programs. 2017-05-18 10:29:47 +00:00
kamil
4dde76f99d Correct hellp_pic ATF test in usr.bin/cc
Drop "-dPIC", this is misspelled "-DPIC" option for libtool.
Enhance code example to be more pedantic.
2017-05-13 23:51:39 +00:00
gson
43ed5fd66c Fix typo 2016-04-03 14:41:30 +00:00
martin
8f3c15e2f4 Add a test case that (if gcc supports it on the current arch) to compile
a PIE binary and see if we can run it.
2012-07-21 12:30:55 +00:00
jruoho
ad9dcd3c99 Deprecate tests/toolchain. 2012-03-17 17:15:28 +00:00