Skip to contentSkip to conversation

powerpc/xive: KUnit tests for xive interrupt controller

PATCH New Mukesh Kumar Chaurasiya (IBM) 1 participant 1 message Mar 20 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/xive: KUnit tests for xive interrupt controller

Kunit tests for xive interrupt controller.

---
 arch/powerpc/sysdev/xive/.kunitconfig |   4 +
 arch/powerpc/sysdev/xive/Kconfig      |   9 +
 arch/powerpc/sysdev/xive/Makefile     |   7 +-
 arch/powerpc/sysdev/xive/xive-test.c  | 294 ++++++++++++++++++++++++++
 4 files changed, 311 insertions(+), 3 deletions(-)
 create mode 100644 arch/powerpc/sysdev/xive/.kunitconfig
 create mode 100644 arch/powerpc/sysdev/xive/xive-test.c
arch/powerpc/sysdev/xive/.kunitconfig new file +4 -0
new file mode 100644
index 000000000000..ea6634bb0718
@@ -0,0 +1,4 @@
+CONFIG_KUNIT=y
+CONFIG_PPC_PSERIES=y
+CONFIG_PPC_XIVE_SPAPR=y
+CONFIG_PPC_XIVE_KUNIT_TEST=y
\ No newline at end of file
arch/powerpc/sysdev/xive/Kconfig +9 -0
index 785c292d104b..81727b9c22b7 100644
@@ -12,3 +12,12 @@ config PPC_XIVE_NATIVE
 config PPC_XIVE_SPAPR
 	bool
 	select PPC_XIVE
+
+config PPC_XIVE_KUNIT_TEST
+	tristate "KUnit tests for XIVE interrupt controller" if !KUNIT_ALL_TESTS
+	depends on KUNIT && PPC_XIVE
+	default KUNIT_ALL_TESTS
+	help
+	  This builds unit tests for the XIVE interrupt controller.
+
+	  If unsure, say N.
arch/powerpc/sysdev/xive/Makefile +4 -3
index e5108883894a..e1f9f513af09 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-y				+= common.o
-obj-$(CONFIG_PPC_XIVE_NATIVE)	+= native.o
-obj-$(CONFIG_PPC_XIVE_SPAPR)	+= spapr.o
+obj-y					+= common.o
+obj-$(CONFIG_PPC_XIVE_NATIVE)		+= native.o
+obj-$(CONFIG_PPC_XIVE_SPAPR)		+= spapr.o
+obj-$(CONFIG_PPC_XIVE_KUNIT_TEST)	+= xive-test.o
arch/powerpc/sysdev/xive/xive-test.c new file +294 -0

294 lines not on this page · raw message

Signature · 1 line
2.53.0