xref: /linux/lib/tests/Makefile (revision 66bd8501ceb4782b10dfa009085d9b3f4efecad6)
1db6fe4d6SKees Cook# SPDX-License-Identifier: GPL-2.0
2db6fe4d6SKees Cook#
3db6fe4d6SKees Cook# Makefile for tests of kernel library functions.
4db6fe4d6SKees Cook
5db6fe4d6SKees Cook# KUnit tests
6db6fe4d6SKees CookCFLAGS_bitfield_kunit.o := $(DISABLE_STRUCTLEAK_PLUGIN)
78b365c4fSGuan-Chun Wuobj-$(CONFIG_BASE64_KUNIT) += base64_kunit.o
8db6fe4d6SKees Cookobj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o
9db6fe4d6SKees Cookobj-$(CONFIG_BITS_TEST) += test_bits.o
101a9239bbSLinus Torvaldsobj-$(CONFIG_BLACKHOLE_DEV_KUNIT_TEST) += blackhole_dev_kunit.o
11db6fe4d6SKees Cookobj-$(CONFIG_CHECKSUM_KUNIT) += checksum_kunit.o
12db6fe4d6SKees Cookobj-$(CONFIG_CMDLINE_KUNIT_TEST) += cmdline_kunit.o
13db6fe4d6SKees Cookobj-$(CONFIG_CPUMASK_KUNIT_TEST) += cpumask_kunit.o
14b3a7bb71SKees Cookobj-$(CONFIG_FFS_KUNIT_TEST) += ffs_kunit.o
15db6fe4d6SKees CookCFLAGS_fortify_kunit.o += $(call cc-disable-warning, unsequenced)
16db6fe4d6SKees CookCFLAGS_fortify_kunit.o += $(call cc-disable-warning, stringop-overread)
17db6fe4d6SKees CookCFLAGS_fortify_kunit.o += $(call cc-disable-warning, stringop-truncation)
18db6fe4d6SKees CookCFLAGS_fortify_kunit.o += $(DISABLE_STRUCTLEAK_PLUGIN)
19db6fe4d6SKees Cookobj-$(CONFIG_FORTIFY_KUNIT_TEST) += fortify_kunit.o
20db6fe4d6SKees CookCFLAGS_test_fprobe.o += $(CC_FLAGS_FTRACE)
21db6fe4d6SKees Cookobj-$(CONFIG_FPROBE_SANITY_TEST) += test_fprobe.o
22bf457942SKir Chouobj-$(CONFIG_GLOB_KUNIT_TEST) += glob_kunit.o
23db6fe4d6SKees Cookobj-$(CONFIG_HASHTABLE_KUNIT_TEST) += hashtable_test.o
24db6fe4d6SKees Cookobj-$(CONFIG_HASH_KUNIT_TEST) += test_hash.o
25db6fe4d6SKees Cookobj-$(CONFIG_TEST_IOV_ITER) += kunit_iov_iter.o
26db6fe4d6SKees Cookobj-$(CONFIG_IS_SIGNED_TYPE_KUNIT_TEST) += is_signed_type_kunit.o
27db6fe4d6SKees Cookobj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
28db6fe4d6SKees Cookobj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o
29*66bd8501SPasha Tatashinobj-$(CONFIG_LIST_PRIVATE_KUNIT_TEST) += list-private-test.o
304d557cb4SDiego Vieiraobj-$(CONFIG_KFIFO_KUNIT_TEST) += kfifo_kunit.o
31db6fe4d6SKees Cookobj-$(CONFIG_TEST_LIST_SORT) += test_list_sort.o
32db6fe4d6SKees Cookobj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
33a10c7949SLinus Torvalds
34a10c7949SLinus TorvaldsCFLAGS_longest_symbol_kunit.o += $(call cc-disable-warning, missing-prototypes)
35a10c7949SLinus Torvaldsobj-$(CONFIG_LONGEST_SYM_KUNIT_TEST) += longest_symbol_kunit.o
36a10c7949SLinus Torvalds
37db6fe4d6SKees Cookobj-$(CONFIG_MEMCPY_KUNIT_TEST) += memcpy_kunit.o
38d30aca3eSRyota Sakamotoobj-$(CONFIG_MIN_HEAP_KUNIT_TEST) += min_heap_kunit.o
39db6fe4d6SKees CookCFLAGS_overflow_kunit.o = $(call cc-disable-warning, tautological-constant-out-of-range-compare)
40db6fe4d6SKees Cookobj-$(CONFIG_OVERFLOW_KUNIT_TEST) += overflow_kunit.o
417a79e7daSTamir Dubersteinobj-$(CONFIG_PRINTF_KUNIT_TEST) += printf_kunit.o
42b370f7eaSKees Cookobj-$(CONFIG_RANDSTRUCT_KUNIT_TEST) += randstruct_kunit.o
4397c1f302STamir Dubersteinobj-$(CONFIG_SCANF_KUNIT_TEST) += scanf_kunit.o
44fc078392SKees Cookobj-$(CONFIG_SEQ_BUF_KUNIT_TEST) += seq_buf_kunit.o
45db6fe4d6SKees Cookobj-$(CONFIG_SIPHASH_KUNIT_TEST) += siphash_kunit.o
46db6fe4d6SKees Cookobj-$(CONFIG_SLUB_KUNIT_TEST) += slub_kunit.o
47db6fe4d6SKees Cookobj-$(CONFIG_TEST_SORT) += test_sort.o
48db6fe4d6SKees CookCFLAGS_stackinit_kunit.o += $(call cc-disable-warning, switch-unreachable)
49db6fe4d6SKees Cookobj-$(CONFIG_STACKINIT_KUNIT_TEST) += stackinit_kunit.o
50db6fe4d6SKees Cookobj-$(CONFIG_STRING_KUNIT_TEST) += string_kunit.o
51db6fe4d6SKees Cookobj-$(CONFIG_STRING_HELPERS_KUNIT_TEST) += string_helpers_kunit.o
52db6fe4d6SKees Cookobj-$(CONFIG_USERCOPY_KUNIT_TEST) += usercopy_kunit.o
53db6fe4d6SKees Cookobj-$(CONFIG_UTIL_MACROS_KUNIT) += util_macros_kunit.o
54d19e9fa6SPaul E. McKenneyobj-$(CONFIG_RATELIMIT_KUNIT_TEST) += test_ratelimit.o
556dcd539fSRyota Sakamotoobj-$(CONFIG_UUID_KUNIT_TEST) += uuid_kunit.o
56db6fe4d6SKees Cook
5784b4a51fSLuis Chamberlainobj-$(CONFIG_TEST_RUNTIME_MODULE)		+= module/
58