Skip to content

Commit 88a4280

Browse files
committed
lkl: define LKL_CONFIG_KASAN_KUNIT_TEST and use for test
CONFIG_KASAN_KUNIT_TEST is a kernel specific build option, so expose it via the arch config.h instead of the tools-generated lkl_autoconf.h. Both LKL_HOST_CONFIG_KASAN and LKL_HOST_CONFIG_KASAN_KUNIT_TEST are now unused so can be removed. Signed-off-by: David Disseldorp <ddiss@suse.de>
1 parent ed768b6 commit 88a4280

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

arch/lkl/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ core-y += arch/lkl/drivers/
6868
configh-y = printf "/* this header is autogenerated */\n"
6969
configh-$(CONFIG_64BIT) += && printf '\#define LKL_CONFIG_64BIT 1\n'
7070
configh-$(CONFIG_CPU_BIG_ENDIAN) += && printf '\#define LKL_CONFIG_CPU_BIG_ENDIAN 1\n'
71+
configh-$(CONFIG_KASAN_KUNIT_TEST) += && printf '\#define LKL_CONFIG_KASAN_KUNIT_TEST 1\n'
7172

7273
quiet_cmd_gen_configh = GEN $@
7374
cmd_gen_configh = mkdir -p $(dir $@); ($(configh-y)) > $@

tools/lkl/Makefile.autoconf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,12 @@ define nt_host
111111
endef
112112

113113
define kasan_test_enable
114-
$(call set_autoconf_var,KASAN_TEST,y)
115114
$(call set_kernel_config,KUNIT,y)
116115
$(call set_kernel_config,BUILTIN_CMDLINE,\"kunit.filter_glob=\")
117116
$(call set_kernel_config,KASAN_KUNIT_TEST,y)
118117
endef
119118

120119
define kasan_enable
121-
$(call set_autoconf_var,KASAN,y)
122120
$(call set_kernel_config,KASAN,y)
123121
$(if $(filter yes,$(kasan_test)), $(call kasan_test_enable))
124122
endef

tools/lkl/tests/boot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ static int lkl_test_join(void)
555555

556556
static const char *boot_log;
557557

558-
#ifdef LKL_HOST_CONFIG_KASAN_TEST
558+
#ifdef LKL_CONFIG_KASAN_KUNIT_TEST
559559

560560
#define KASAN_CMD_LINE "kunit.filter_glob=kasan* "
561561

@@ -707,7 +707,7 @@ struct lkl_test tests[] = {
707707
LKL_TEST(semaphore),
708708
LKL_TEST(join),
709709
LKL_TEST(start_kernel),
710-
#ifdef LKL_HOST_CONFIG_KASAN_TEST
710+
#ifdef LKL_CONFIG_KASAN_KUNIT_TEST
711711
LKL_TEST(kasan),
712712
#endif
713713
LKL_TEST(getpid),

0 commit comments

Comments
 (0)