linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 1/6] kunit: move KUNIT_TABLE out of INIT_DATA
@ 2023-12-13 19:44 Rae Moar
  2023-12-13 19:44 ` [PATCH v5 2/6] kunit: add KUNIT_INIT_TABLE to init linker section Rae Moar
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Rae Moar @ 2023-12-13 19:44 UTC (permalink / raw)
  To: shuah, davidgow, dlatypov, brendan.higgins, sadiyakazi
  Cc: keescook, arnd, linux-kselftest, linux-arch, kunit-dev,
	linux-kernel, Rae Moar

Alter the linker section of KUNIT_TABLE to move it out of INIT_DATA and
into DATA_DATA.

Data for KUnit tests does not need to be in the init section.

In order to run tests again after boot the KUnit data cannot be labeled as
init data as the kernel could write over it.

Add a KUNIT_INIT_TABLE in the next patch for KUnit tests that test init
data/functions.

Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Rae Moar <rmoar@google.com>
---
 include/asm-generic/vmlinux.lds.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index bae0fe4d499b..1107905d37fc 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -370,7 +370,8 @@
 	BRANCH_PROFILE()						\
 	TRACE_PRINTKS()							\
 	BPF_RAW_TP()							\
-	TRACEPOINT_STR()
+	TRACEPOINT_STR()						\
+	KUNIT_TABLE()
 
 /*
  * Data section helpers
@@ -699,8 +700,7 @@
 	THERMAL_TABLE(governor)						\
 	EARLYCON_TABLE()						\
 	LSM_TABLE()							\
-	EARLY_LSM_TABLE()						\
-	KUNIT_TABLE()
+	EARLY_LSM_TABLE()
 
 #define INIT_TEXT							\
 	*(.init.text .init.text.*)					\

base-commit: b285ba6f8cc1b2bfece0b4350fdb92c8780bc698
-- 
2.43.0.472.g3155946c3a-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-14  3:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 19:44 [PATCH v5 1/6] kunit: move KUNIT_TABLE out of INIT_DATA Rae Moar
2023-12-13 19:44 ` [PATCH v5 2/6] kunit: add KUNIT_INIT_TABLE to init linker section Rae Moar
2023-12-13 19:44 ` [PATCH v5 3/6] kunit: add example suite to test init suites Rae Moar
2023-12-14  3:04   ` David Gow
2023-12-13 19:44 ` [PATCH v5 4/6] kunit: add is_init test attribute Rae Moar
2023-12-13 19:44 ` [PATCH v5 5/6] kunit: add ability to run tests after boot using debugfs Rae Moar
2023-12-13 19:44 ` [PATCH v5 6/6] Documentation: Add debugfs docs with run after boot Rae Moar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).