From: Christoph Lameter Date: Fri, 9 Nov 2007 19:15:54 -0800 Subject: Add tests infrastructure for future in kernel benchmarks Signed-off-by: Christoph Lameter --- Makefile | 2 include/Kbuild | 1 lib/Kconfig.debug | 1 tests/Kconfig | 19 ++ tests/Makefile | 2 tests/slab_test.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 397 insertions(+), 1 deletion(-) create mode 100644 tests/Makefile create mode 100644 tests/slab_test.c Index: linux/tests/Kconfig =================================================================== --- /dev/null +++ linux/tests/Kconfig @@ -0,0 +1,12 @@ +menuconfig BENCHMARKS + bool "In kernel benchmarks" + def_bool n + help + Includes in kernel benchmark modules in the build. These modules can + be loaded later to trigger benchmarking kernel subsystems. + Output will be generated in the system log. + +if BENCHMARKS + +endif # BENCHMARKS + Index: linux/Makefile =================================================================== --- linux.orig/Makefile +++ linux/Makefile @@ -751,7 +751,7 @@ endif ifeq ($(KBUILD_EXTMOD),) # Objects we will link into vmlinux / subdirs we need to visit -core-y := +core-y := tests/ drivers-y := libs-y := lib/ endif # KBUILD_EXTMOD Index: linux/lib/Kconfig.debug =================================================================== --- linux.orig/lib/Kconfig.debug +++ linux/lib/Kconfig.debug @@ -2125,6 +2125,8 @@ config KCOV_IRQ_AREA_SIZE soft interrupts. This specifies the size of those areas in the number of unsigned long words. +source "tests/Kconfig" + menuconfig RUNTIME_TESTING_MENU bool "Runtime Testing" def_bool y Index: linux/scripts/Makefile.package =================================================================== --- linux.orig/scripts/Makefile.package +++ linux/scripts/Makefile.package @@ -8,7 +8,7 @@ KERNELPATH := kernel-$(subst -,_,$(KERNE # Include only those top-level files that are needed by make, plus the GPL copy TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \ include init io_uring ipc kernel lib mm net rust \ - samples scripts security sound tools usr virt \ + samples scripts security sound tests tools usr virt \ .config Makefile \ Kbuild Kconfig COPYING $(wildcard localversion*) MKSPEC := $(srctree)/scripts/package/mkspec Index: linux/tests/Makefile =================================================================== --- /dev/null +++ linux/tests/Makefile @@ -0,0 +1,2 @@ +# Building the benchmark modules here +#