lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190114135144.26096-12-geert+renesas@glider.be>
Date:   Mon, 14 Jan 2019 14:51:43 +0100
From:   Geert Uytterhoeven <geert+renesas@...der.be>
To:     Shuah Khan <shuah@...nel.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>
Cc:     Jonathan Corbet <corbet@....net>,
        Bamvor Jian Zhang <bamv2005@...il.com>,
        Kees Cook <keescook@...omium.org>,
        linux-kselftest@...r.kernel.org, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH 11/12] selftests: Add kselftest-build target

The documented way to build kselftest is to run

    make -C tools/testing/selftests

with an optional "O=..." parameter to specify the output directory.

However, all of the above assume you run make from the source directory.
while other make commands can simply be run from the output directory,
too (the autogenerated Makefile in the output directory takes care of
this).

Add a "kselftest-build" target, so "make kselftest-build" can be used
from either the source or output directory.

Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
Perhaps this make target should just be called "kselftest", and the
existing "kselftest" target be renamed to "kselftest-run"?
---
 Documentation/dev-tools/kselftest.rst | 4 ++++
 Makefile                              | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index 7756f7a7c23b9408..b90b4ee6334a0941 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -21,6 +21,10 @@ To build the tests::
 
   $ make -C tools/testing/selftests
 
+Or:
+
+  $ make kselftest-build
+
 To run the tests::
 
   $ make -C tools/testing/selftests run_tests
diff --git a/Makefile b/Makefile
index 5355033dda6ed1ea..27a56de7ed45091e 100644
--- a/Makefile
+++ b/Makefile
@@ -1193,6 +1193,10 @@ PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
 
+PHONY += kselftest-build
+kselftest-build:
+	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
+
 PHONY += kselftest-clean
 kselftest-clean:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean O=$(abspath $(objtree)/tools/testing/selftests)
@@ -1445,6 +1449,7 @@ help:
 	@echo  '  kselftest       - Build and run kernel selftest (run as root)'
 	@echo  '                    Build, install, and boot kernel before'
 	@echo  '                    running kselftest on it'
+	@echo  '  kselftest-build - Build kselftest files'
 	@echo  '  kselftest-clean - Remove all generated kselftest files'
 	@echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existing'
 	@echo  '                    .config.'
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ