# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
# Description: samples/ldk/tests/Makefile
# Author: Huawei OS Kernel Lab
# Create: Mon Apr  8 10:39:37 2024
#

obj-m += test_find_vma.o
obj-m += test_vmalloc_remap.o
obj-m += test_liblinux_exit.o
obj-m += test_signal.o
obj-m += test_cred.o
obj-m += test_vmallocinfo.o
obj-m += test_pidfd_anon_fget.o
ifdef CONFIG_KUNIT
obj-m += test_kthread.o
endif

ifeq ($(CONFIG_SAMPLE_LDK_SDV_TEST), y)
obj-y := test_procfs.o
obj-y += test_export.o
obj-m += test_ksys.o
obj-m += test_ldk.o
test_ldk-objs += test_ldk_main.o
test_ldk-objs += test_sysfs.o
test_ldk-objs += test_kernel.o
test_ldk-objs += test_kmsg_dump.o
test_ldk-objs += test_hvc.o
test_ldk-objs += test_random.o
test_ldk-objs += test_kthread_unpark.o
test_ldk-objs += test_kworker.o
test_ldk-objs += test_dma_remap.o
test_ldk-objs += test_vmalloc.o
test_ldk-objs += test_filp_open.o
test_ldk-objs += test_tick.o
ifeq ($(CONFIG_KPROBES), y)
test_ldk-objs += test_kprobes.o
endif
ifeq ($(CONFIG_KRETPROBES), y)
test_ldk-objs += test_kretprobes.o
endif
ifeq ($(CONFIG_HW_QOS_SCHED), y)
obj-m += test_qos.o
endif
endif
obj-m += test_fget.o
obj-m += test_task_struct.o
obj-m += test_uaccess.o

ifeq ($(CONFIG_LIBLINUX_COMPACTION), y)
obj-m += test_compact.o
endif

ifeq ($(CONFIG_LIBLINUX_OPEN_EULER_5_10),y)
ccflags-y += -Wno-int-conversion
endif

ifeq ($(CONFIG_LIBLINUX_PROCESS_CHECKPOINT), y)
obj-m += process_checkpoint_test.o
endif
