[PATCH v2 3/5] tests: of_overlay: add selftests skeleton
Stefan Kerkmann
s.kerkmann at pengutronix.de
Mon Oct 19 03:05:46 PDT 2026
Add a simple test harness for the upcoming of_overlay selftests.
Signed-off-by: Stefan Kerkmann <s.kerkmann at pengutronix.de>
---
test/self/Kconfig | 7 +++++++
test/self/Makefile | 1 +
test/self/of_overlay.c | 16 ++++++++++++++++
3 files changed, 24 insertions(+)
diff --git a/test/self/Kconfig b/test/self/Kconfig
index 75cfcd1570..bdee21f17d 100644
--- a/test/self/Kconfig
+++ b/test/self/Kconfig
@@ -35,6 +35,7 @@ config SELFTEST_ENABLE_ALL
select SELFTEST_CLEANUP
select SELFTEST_PROGRESS_NOTIFIER
select SELFTEST_OF_MANIPULATION
+ select SELFTEST_OF_OVERLAY
select SELFTEST_ENVIRONMENT_VARIABLES if ENVIRONMENT_VARIABLES
select SELFTEST_FS_RAMFS if FS_RAMFS
select SELFTEST_DIRFD if FS_RAMFS && FS_DEVFS
@@ -97,6 +98,12 @@ config SELFTEST_OF_MANIPULATION
help
Tests barebox device tree manipulation functionality
+config SELFTEST_OF_OVERLAY
+ bool "OF overlay selftest"
+ select OF_OVERLAY
+ help
+ Tests devicetree overlay application
+
config SELFTEST_PROGRESS_NOTIFIER
bool "progress notifier selftest"
diff --git a/test/self/Makefile b/test/self/Makefile
index c7b5188beb..f912afe5a6 100644
--- a/test/self/Makefile
+++ b/test/self/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_SELFTEST_PRINTF) += printf.o
CFLAGS_printf.o += -Wno-format-security -Wno-format
obj-$(CONFIG_SELFTEST_PROGRESS_NOTIFIER) += progress-notifier.o
obj-$(CONFIG_SELFTEST_OF_MANIPULATION) += of_manipulation.o of_manipulation.dtb.o
+obj-$(CONFIG_SELFTEST_OF_OVERLAY) += of_overlay.o
obj-$(CONFIG_SELFTEST_ENVIRONMENT_VARIABLES) += envvar.o
obj-$(CONFIG_SELFTEST_FS_RAMFS) += ramfs.o
obj-$(CONFIG_SELFTEST_DIRFD) += dirfd.o
diff --git a/test/self/of_overlay.c b/test/self/of_overlay.c
new file mode 100644
index 0000000000..d60898358f
--- /dev/null
+++ b/test/self/of_overlay.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <common.h>
+#include <bselftest.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <of.h>
+
+BSELFTEST_GLOBALS();
+
+static void test_of_overlay(void)
+{
+}
+bselftest(core, test_of_overlay);
--
2.47.3
More information about the barebox
mailing list