[PATCH v1 07/22] selftests/nolibc: add common extra config options

From: Zhangjin Wu
Date: Sun Jun 25 2023 - 12:23:12 EST


This adds config options required by all of the architectures.

* for initrd
-e BLK_DEV_INITRD --set-str CONFIG_INITRAMFS_SOURCE $(CURDIR)/initramfs

* for init executable
-e BINFMT_ELF

* for test result print
-e PRINTK -e TTY

* for panic reset instead of hang
--set-val PANIC_TIMEOUT 1

Signed-off-by: Zhangjin Wu <falcon@xxxxxxxxxxx>
---
tools/testing/selftests/nolibc/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 0b810681547b..147c2db49635 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -49,7 +49,10 @@ DEFCONFIG_loongarch = defconfig
DEFCONFIG = $(DEFCONFIG_$(ARCH))

# extra kernel configs shared among architectures
-EXTCONFIG_COMMON = --set-str CONFIG_INITRAMFS_SOURCE $(CURDIR)/initramfs
+EXTCONFIG_COMMON = -e BLK_DEV_INITRD --set-str INITRAMFS_SOURCE $(CURDIR)/initramfs
+EXTCONFIG_COMMON += --set-val PANIC_TIMEOUT 1
+EXTCONFIG_COMMON += -e PRINTK -e TTY
+EXTCONFIG_COMMON += -e BINFMT_ELF

# extra kernel configs by architecture
EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH))
--
2.25.1