1# $NetBSD: Makefile,v 1.9 2024/12/18 02:47:00 riastradh Exp $
2
3.include <bsd.own.mk>
4
5TESTSDIR= ${TESTSBASE}/usr.bin/cc
6
7ASAN_TESTS=         #
8ASAN_TESTS+=        t_asan_double_free
9ASAN_TESTS+=        t_asan_global_buffer_overflow
10ASAN_TESTS+=        t_asan_heap_overflow
11ASAN_TESTS+=        t_asan_off_by_one
12ASAN_TESTS+=        t_asan_poison
13ASAN_TESTS+=        t_asan_uaf
14
15UBSAN_TESTS=        #
16UBSAN_TESTS+=       t_ubsan_int_add_overflow
17UBSAN_TESTS+=       t_ubsan_int_neg_overflow
18UBSAN_TESTS+=       t_ubsan_vla_out_of_bounds
19UBSAN_TESTS+=       t_ubsan_int_sub_overflow
20UBSAN_TESTS+=       t_ubsan_int_divzero
21
22TESTS_SH= #
23TESTS_SH+=          $(ASAN_TESTS)
24TESTS_SH+=          $(UBSAN_TESTS)
25
26TESTS_SH+=          t_ctype_abuse
27TESTS_SH+=          t_hello
28TESTS_SH+=          t_libgomp
29
30TESTS_SH+=          t_fuzzer_oom
31TESTS_SH+=          t_fuzzer_simple
32TESTS_SH+=          t_fuzzer_timeout
33
34TESTS_SH+=          t_msan_allocated_memory
35TESTS_SH+=          t_msan_check_mem
36TESTS_SH+=          t_msan_free
37TESTS_SH+=          t_msan_heap
38TESTS_SH+=          t_msan_partial_poison
39TESTS_SH+=          t_msan_poison
40TESTS_SH+=          t_msan_realloc
41TESTS_SH+=          t_msan_shadow
42TESTS_SH+=          t_msan_stack
43TESTS_SH+=          t_msan_unpoison
44
45TESTS_SH+=          t_tsan_data_race
46TESTS_SH+=          t_tsan_heap_use_after_free
47TESTS_SH+=          t_tsan_lock_order_inversion
48TESTS_SH+=          t_tsan_locked_mutex_destroy
49TESTS_SH+=          t_tsan_signal_errno
50TESTS_SH+=          t_tsan_thread_leak
51
52.for test in ${ASAN_TESTS}
53TESTS_SH_SRC_${test}=         asan_common.subr ${test}.sh
54.endfor
55.for test in ${UBSAN_TESTS}
56TESTS_SH_SRC_${test}=         ubsan_common.subr ${test}.sh
57.endfor
58
59.include <bsd.test.mk>
60