This patch series adds a new kselftest_install make target
to enable selftest install. When make kselftest_install is
run, selftests are installed on the system. A new install
target is added to selftests Makefile which will install
targets for the tests that are specified in INSTALL_TARGETS.
During install, a script is generated to run tests that are
installed. This script will be installed in the selftest install
directory. Individual test Makefiles are changed to add to the
script. This will allow new tests to add install and run test
commands to the generated kselftest script. kselftest target
now depends on kselftest_install and runs the generated kselftest
script to reduce duplicate work and for common look and feel when
running tests.
This approach leverages and extends the existing framework that
uses makefile targets to implement run_tests and adds install
target. This will scale well as new tests get added and makes
it easier for test writers to add install target at the same
time new test gets added.
This series is uploaded to the following experimental branch
for anybody that is interested in playing with it:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git devel
Some benchmark numbers: no relation to this patch series,
I just happened to get some timing numbers, this is nice
and low.
kselftest full run from install dir using kselftest.sh
9.41user 3.55system 0:24.86elapsed
This v4 series fixes echo strings to add quotes around them.
There is no change to the 00/20 kbuild patch in this series.
Other patches in the sries are updated to fix the echo strings.
v3 series: reduced duplicate code to generate script
in indiviual test Makefiles and consolidates support in
selftests main Makefile. In the main Makefile, it does
minimal work to set and export install path.
v2 series: addressed the duplicate code in install and
run_tests targets in individual test Makefiles.
Reference: https://lkml.org/lkml/2014/11/4/707
Shuah Khan (20):
selftests/breakpoints: add install target to enable test install
selftests/cpu-hotplug: add install target to enable test install
selftests/efivarfs: add install target to enable test install
selftests/firmware: add install target to enable test install
selftests/ftrace: add install target to enable test install
selftests/ipc: add install target to enable test install
selftests/kcmp: add install target to enable test install
selftests/memfd: add install target to enable test install
selftests/memory-hotplug: add install target to enable test install
selftests/mount: add install target to enable test install
selftests/mqueue: add install target to enable test install
selftests/net: add install target to enable test install
selftests/ptrace: add install target to enable test install
selftests/size: add install target to enable test install
selftests/sysctl: add install target to enable test install
selftests/timers: add install target to enable test install
selftests/user: add install target to enable test install
selftests/vm: add install target to enable test install
selftests: add install target to enable test install
kbuild: add a new kselftest_install make target to install selftests
Makefile | 14 +++++-
tools/testing/selftests/Makefile | 54 +++++++++++++++++++++-
tools/testing/selftests/breakpoints/Makefile | 19 +++++++-
tools/testing/selftests/cpu-hotplug/Makefile | 14 +++++-
.../{on-off-test.sh => cpu-on-off-test.sh} | 0
tools/testing/selftests/efivarfs/Makefile | 16 ++++++-
tools/testing/selftests/firmware/Makefile | 43 ++++++++++-------
tools/testing/selftests/ftrace/Makefile | 13 +++++-
tools/testing/selftests/ipc/Makefile | 19 +++++++-
tools/testing/selftests/kcmp/Makefile | 13 +++++-
tools/testing/selftests/memfd/Makefile | 17 +++++--
tools/testing/selftests/memory-hotplug/Makefile | 14 +++++-
.../{on-off-test.sh => mem-on-off-test.sh} | 0
tools/testing/selftests/mount/Makefile | 12 ++++-
tools/testing/selftests/mqueue/Makefile | 18 ++++++--
tools/testing/selftests/net/Makefile | 20 ++++++--
tools/testing/selftests/ptrace/Makefile | 16 +++++--
tools/testing/selftests/size/Makefile | 12 ++++-
tools/testing/selftests/sysctl/Makefile | 17 ++++++-
tools/testing/selftests/timers/Makefile | 12 ++++-
tools/testing/selftests/user/Makefile | 12 ++++-
tools/testing/selftests/vm/Makefile | 11 ++++-
22 files changed, 317 insertions(+), 49 deletions(-)
rename tools/testing/selftests/cpu-hotplug/{on-off-test.sh => cpu-on-off-test.sh} (100%)
rename tools/testing/selftests/memory-hotplug/{on-off-test.sh => mem-on-off-test.sh} (100%)
--
2.1.0
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/breakpoints/Makefile | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
@@ -16,8 +17,22 @@ elseecho"Not an x86 target, can't build breakpoints selftests"endif-run_tests:-@./breakpoint_test||echo"breakpoints selftests: [FAIL]"+install:+ifdef INSTALL_KSFT_PATH+ifeq ($(ARCH),x86)+install./breakpoint_test$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Not an x86 target, unable to install breakpoints selftests"+endif+else+@echo"Run make kselftest_install in top level source directory"+endif++run_tests:all+ifeq ($(ARCH),x86)+@$(TEST_STR)+endifclean:rm-frbreakpoint_test
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu <redacted>
---
tools/testing/selftests/ftrace/Makefile | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/memfd/Makefile | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/timers/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
@@ -1,8 +1,18 @@+TEST_STR=./posix_timers+all:gccposix_timers.c-oposix_timers-lrt+install:+ifdef INSTALL_KSFT_PATH+install./posix_timers$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-./posix_timers+@$(TEST_STR)clean:rm-f./posix_timers
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <redacted>
---
Makefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Add a new make target to enable installing selftests. This
new target will call install targets for the tests that are
specified in INSTALL_TARGETS. During install, a script is
generated to run tests that are installed. This script will
be installed in the selftest install directory. Individual
test Makefiles are changed to add to the script. This will
allow new tests to add install and run test commands to the
generated kselftest script. run_tests target runs the
generated kselftest script to run tests when it is initiated
from from "make kselftest" from top level source directory.
Approach:
Add a new kselftest_install target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make kselftest_install target:
selftests make install target
-- Sets up environment for sub-makefiles
-- creates kselftest.sh script in install install dir
-- runs install targets for INSTALL_TARGETS
-- install target can be run only from top level source dir.
Individual test make install targets:
-- install test programs and/or scripts in install dir
-- append to the ksefltest.sh file to add commands to run test
-- install target can be run only from top level source dir.
Adds the following new ways to initiate selftests:
-- Installing and running kselftest from install directory
by running "make kselftest"
-- Running kselftest script from install directory
Maintains the following ways to run tests:
-- make TARGETS=net kselftest
-- make -C tools/testing/selftests run_tests
-- make -C tools/testing/selftests TARGETS=target run_tests
Ability specify targets: e.g TARGETS=net
-- make run_tests from tools/testing/selftests
-- make run_tests from individual test directories:
e.g: make run_tests in tools/testing/selftests/net
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/Makefile | 54 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 53 insertions(+), 1 deletion(-)
@@ -22,15 +22,67 @@ TARGETS += vmTARGETS_HOTPLUG=cpu-hotplugTARGETS_HOTPLUG+=memory-hotplug+# Used in only run_tests target when make kselftest is run in+# top level source directory+ifeq "$(origin TARGETS)" "command line"+no_install_run=1+endif++ifdef INSTALL_KSFT_PATH+KSELFTEST=$(INSTALL_KSFT_PATH)/kselftest.sh+exportKSELFTEST+# TODO add install target for SKIP_INSTALL_TARGETS+SKIP_INSTALL_TARGETS=execpowerpc+INSTALL_TARGETS=$(filter-out$(SKIP_INSTALL_TARGETS),$(TARGETS))ipc+else+no_install_run=1+endif++INSTALL_KSFT_ERR="Run make kselftest_install in top level source directory"+all:forTARGETin$(TARGETS);do\make-C$$TARGET;\done;-run_tests:all+install:+ifdef INSTALL_KSFT_PATH+rm-rf$(INSTALL_KSFT_PATH)+mkdir-p$(INSTALL_KSFT_PATH)++makeall+@echo"#!/bin/sh\n# Kselftest Run Tests ....">>$(KSELFTEST)+@echo"# This file is generated by kselftest_install">>$(KSELFTEST)+@echo"# Please don't change it !!\n">>$(KSELFTEST)+@echo"echo \"============================\"">>$(KSELFTEST)+forTARGETin$(INSTALL_TARGETS);do\+echo"Installing $$TARGET";\+echo"echo \"Start $$TARGET test ....\"">>$(KSELFTEST);\+make-C$$TARGETinstall;\+echo"echo \"End $$TARGET test ....\"">>$(KSELFTEST);\+echo"echo \"============================\"">>$(KSELFTEST);\+done;+chmod+x$(KSELFTEST)+else+@echo$(INSTALL_KSFT_ERR)+endif++run_tests:+ifndef no_install_run+# ifdef INSTALL_KSFT_PATH+makeinstall+@cd$(INSTALL_KSFT_PATH);./kselftest.sh;cd-+# invoke run_tests for SKIP_INSTALL_TARGETS+forTARGETin$(SKIP_INSTALL_TARGETS);do\+make-C$$TARGETrun_tests;\+done;+# endif+else+makeallforTARGETin$(TARGETS);do\make-C$$TARGETrun_tests;\done;+endifhotplug:forTARGETin$(TARGETS_HOTPLUG);do\
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/vm/Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
@@ -4,13 +4,22 @@ CC = $(CROSS_COMPILE)gccCFLAGS=-WallBINARIES=hugepage-mmaphugepage-shmmap_hugetlbthuge-genhugetlbfstestBINARIES+=transhuge-stress+TEST_STR=/bin/sh./run_vmtests||echo'vmtests: [FAIL]'all:$(BINARIES)%:%.c$(CC)$(CFLAGS)-o$@$^+install:+ifdef INSTALL_KSFT_PATH+installrun_vmtests$(BINARIES)$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-@/bin/sh./run_vmtests||(echo"vmtests: [FAIL]";exit1)+@$(TEST_STR)clean:$(RM)$(BINARIES)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/user/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
@@ -1,7 +1,17 @@# Makefile for user memory selftests+TEST_STR=./test_user_copy.sh+# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"all:+install:+ifdef INSTALL_KSFT_PATH+install./test_user_copy.sh$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-./test_user_copy.sh+@$(TEST_STR)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/cpu-hotplug/Makefile | 14 ++++++++++++--
.../cpu-hotplug/{on-off-test.sh => cpu-on-off-test.sh} | 0
2 files changed, 12 insertions(+), 2 deletions(-)
rename tools/testing/selftests/cpu-hotplug/{on-off-test.sh => cpu-on-off-test.sh} (100%)
@@ -1,9 +1,19 @@+TEST_STR=/bin/bash./cpu-on-off-test.sh||echo'cpu-hotplug selftests: [FAIL]'+all:+install:+ifdef INSTALL_KSFT_PATH+install./cpu-on-off-test.sh$(INSTALL_KSFT_PATH)/cpu-on-off-test.sh+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:-@/bin/bash./on-off-test.sh||echo"cpu-hotplug selftests: [FAIL]"+@$(TEST_STR)run_full_test:-@/bin/bash./on-off-test.sh-a||echo"cpu-hotplug selftests: [FAIL]"+@/bin/bash./cpu-on-off-test.sh-a||echo"cpu-hotplug selftests: [FAIL]"clean:
diff --git a/tools/testing/selftests/cpu-hotplug/on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.shsimilarity index 100%rename from tools/testing/selftests/cpu-hotplug/on-off-test.shrename to tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
--
2.1.0
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/sysctl/Makefile | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
@@ -4,12 +4,25 @@# No binaries, but make sure arg-less "make" doesn't trigger "run_tests".all:+INSTALL_PROGS=common_testsrun_numerictestsrun_stringtests+NUMERIC_TEST_STR=/bin/sh./run_numerictests+STRING_TEST_STR=/bin/sh./run_stringtests+# Allow specific tests to be selected.test_num:-@/bin/sh./run_numerictests+@$(NUMERIC_TEST_STR)test_string:-@/bin/sh./run_stringtests+@$(STRING_TEST_STR)++install:all+ifdef INSTALL_KSFT_PATH+install$(INSTALL_PROGS)$(INSTALL_KSFT_PATH)+@echo"$(NUMERIC_TEST_STR)">>$(KSELFTEST)+@echo"$(STRING_TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endifrun_tests:alltest_numtest_string
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/size/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
@@ -1,12 +1,22 @@CC=$(CROSS_COMPILE)gcc+TEST_STR=./get_size||echo'get_size selftests: [FAIL]'+all:get_sizeget_size:get_size.c$(CC)-static-ffreestanding-nostartfiles-s$<-o$@+install:+ifdef INSTALL_KSFT_PATH+install./get_size$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-./get_size+@$(TEST_STR)clean:$(RM)get_size
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/ptrace/Makefile | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/net/Makefile | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/mqueue/Makefile | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/memory-hotplug/Makefile | 14 ++++++++++++--
.../memory-hotplug/{on-off-test.sh => mem-on-off-test.sh} | 0
2 files changed, 12 insertions(+), 2 deletions(-)
rename tools/testing/selftests/memory-hotplug/{on-off-test.sh => mem-on-off-test.sh} (100%)
@@ -1,9 +1,19 @@+TEST_STR=/bin/bash./mem-on-off-test.sh-r2||echo'memory-hotplug selftests: [FAIL]'+all:+install:+ifdef INSTALL_KSFT_PATH+install./mem-on-off-test.sh$(INSTALL_KSFT_PATH)/mem-on-off-test.sh+@echo"$(TEST_STR)">>$(KSELFTEST)>>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:-@/bin/bash./on-off-test.sh-r2||echo"memory-hotplug selftests: [FAIL]"+@$(TEST_STR)run_full_test:-@/bin/bash./on-off-test.sh||echo"memory-hotplug selftests: [FAIL]"+@/bin/bash./mem-on-off-test.sh||echo"memory-hotplug selftests: [FAIL]"clean:
diff --git a/tools/testing/selftests/memory-hotplug/on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.shsimilarity index 100%rename from tools/testing/selftests/memory-hotplug/on-off-test.shrename to tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
--
2.1.0
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/mount/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
@@ -1,5 +1,7 @@# Makefile for mount selftests.+TEST_STR=if[-f/proc/self/uid_map];then./unprivileged-remount-test;fi+all:unprivileged-remount-testunprivileged-remount-test:unprivileged-remount-test.c
@@ -7,7 +9,15 @@ unprivileged-remount-test: unprivileged-remount-test.c# Allow specific tests to be selected.test_unprivileged_remount:unprivileged-remount-test-@if[-f/proc/self/uid_map];then./unprivileged-remount-test;fi+@$(TEST_STR)++install:+ifdef INSTALL_KSFT_PATH+install./unprivileged-remount-test$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endifrun_tests:alltest_unprivileged_remount
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/kcmp/Makefile | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
@@ -1,10 +1,21 @@CC:=$(CROSS_COMPILE)$(CC)CFLAGS+=-I../../../../usr/include/+TEST_STR=./kcmp_test||echo'kcmp_test: [FAIL]'+all:kcmp_test+install:+ifdef INSTALL_KSFT_PATH+install./kcmp_test$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+@echorm-fkcmp-test-file>>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-@./kcmp_test||echo"kcmp_test: [FAIL]"+@$(TEST_STR)clean:$(RM)kcmp_testkcmp-test-file
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/ipc/Makefile | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
@@ -18,8 +20,23 @@ elseecho"Not an x86 target, can't build msgque selftest"endif+install:+ifdef INSTALL_KSFT_PATH+ifeq ($(ARCH),x86)+makeall+install./msgque_test$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Not an x86 target, unable to install ipc msgque selftests"+endif+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-./msgque_test+ifeq ($(ARCH),x86)+@$(TEST_STR)+endifclean:rm-fr./msgque_test
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/firmware/Makefile | 43 +++++++++++++++++++------------
1 file changed, 26 insertions(+), 17 deletions(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/efivarfs/Makefile | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <redacted>
---
tools/testing/selftests/size/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
@@ -1,12 +1,22 @@CC=$(CROSS_COMPILE)gcc+TEST_STR=./get_size||echo'get_size selftests: [FAIL]'+all:get_sizeget_size:get_size.c$(CC)-static-ffreestanding-nostartfiles-s$<-o$@+install:+ifdef INSTALL_KSFT_PATH+install./get_size$(INSTALL_KSFT_PATH)+@echo"$(TEST_STR)">>$(KSELFTEST)+else+@echo"Run make kselftest_install in top level source directory"+endif+run_tests:all-./get_size+@$(TEST_STR)clean:$(RM)get_size
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <redacted>
---
Makefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Hi Marek,
Could you please Ack this patch, if this version looks good,
so I can take this through ksefltest tree.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
From: Michal Marek <hidden> Date: 2015-01-15 11:39:13
On 2015-01-14 17:32, Shuah Khan wrote:
On 01/06/2015 12:43 PM, Shuah Khan wrote:
quoted
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <redacted>
---
Makefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Hi Marek,
Could you please Ack this patch, if this version looks good,
so I can take this through ksefltest tree.
Sorry, I thought I had acked v3.
Acked-by: Michal Marek <redacted>
Michal
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-01-15 22:58:40
On Wed, 2015-01-14 at 09:32 -0700, Shuah Khan wrote:
On 01/06/2015 12:43 PM, Shuah Khan wrote:
quoted
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <redacted>
Hi Marek,
Could you please Ack this patch, if this version looks good,
so I can take this through ksefltest tree.
Hi Shuah,
I posted what I think is a better approach last week. It's less code and less
repetition, and installs the majority of tests this series missed - ie. the
powerpc ones.
Please at least respond to it before you put this series into next.
https://lkml.org/lkml/2015/1/9/45
cheers
On Wed, 2015-01-14 at 09:32 -0700, Shuah Khan wrote:
quoted
On 01/06/2015 12:43 PM, Shuah Khan wrote:
quoted
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <redacted>
Hi Marek,
Could you please Ack this patch, if this version looks good,
so I can take this through ksefltest tree.
Hi Shuah,
I posted what I think is a better approach last week. It's less code and less
repetition, and installs the majority of tests this series missed - ie. the
powerpc ones.
Please at least respond to it before you put this series into next.
https://lkml.org/lkml/2015/1/9/45
Michael,
I didn't get a chance to review your patches yet. I plan to
review and give you feedback by end of this week. This patch
is needed in any case for either approach.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-01-16 02:59:37
On Thu, 2015-01-15 at 16:41 -0700, Shuah Khan wrote:
On 01/15/2015 03:58 PM, Michael Ellerman wrote:
quoted
On Wed, 2015-01-14 at 09:32 -0700, Shuah Khan wrote:
quoted
On 01/06/2015 12:43 PM, Shuah Khan wrote:
quoted
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <redacted>
Hi Marek,
Could you please Ack this patch, if this version looks good,
so I can take this through ksefltest tree.
Hi Shuah,
I posted what I think is a better approach last week. It's less code and less
repetition, and installs the majority of tests this series missed - ie. the
powerpc ones.
Please at least respond to it before you put this series into next.
https://lkml.org/lkml/2015/1/9/45
Michael,
I didn't get a chance to review your patches yet. I plan to
review and give you feedback by end of this week.
Thanks. My week ends quite soon (.au time zone), so early next week is fine.
This patch is needed in any case for either approach.
The version in my series is slightly different, but probably similar enough. I
CC'ed Michal on my series also.
cheers