Skip to content

Commit

Permalink
vmlinux.lds.h: add linker section for KUnit test suites
Browse files Browse the repository at this point in the history
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: Iurii Zaikin <yzaikin@google.com>
Signed-off-by: Iurii Zaikin <yzaikin@google.com>
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Brendan Higgins authored and Shuah Khan committed Oct 9, 2020
1 parent 2a41fc5 commit 90a025a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.*) \
Expand Down Expand Up @@ -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); \
Expand Down

0 comments on commit 90a025a

Please sign in to comment.