Commit 90a025a8 authored by Brendan Higgins's avatar Brendan Higgins Committed by Shuah Khan
Browse files

vmlinux.lds.h: add linker section for KUnit test suites



Add a linker section where KUnit can put references to its test suites.
This patch is the first step in transitioning to dispatching all KUnit
tests from a centralized executor rather than having each as its own
separate late_initcall.

Co-developed-by: default avatarIurii Zaikin <yzaikin@google.com>
Signed-off-by: default avatarIurii Zaikin <yzaikin@google.com>
Signed-off-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 2a41fc52
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -717,7 +717,8 @@
	THERMAL_TABLE(governor)						\
	EARLYCON_TABLE()						\
	LSM_TABLE()							\
	EARLY_LSM_TABLE()
	EARLY_LSM_TABLE()						\
	KUNIT_TABLE()

#define INIT_TEXT							\
	*(.init.text .init.text.*)					\
@@ -909,6 +910,13 @@
		KEEP(*(.con_initcall.init))				\
		__con_initcall_end = .;

/* Alignment must be consistent with (kunit_suite *) in include/kunit/test.h */
#define KUNIT_TABLE()							\
		. = ALIGN(8);						\
		__kunit_suites_start = .;				\
		KEEP(*(.kunit_test_suites))				\
		__kunit_suites_end = .;

#ifdef CONFIG_BLK_DEV_INITRD
#define INIT_RAM_FS							\
	. = ALIGN(4);							\