Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1731298 > unrolled thread
| Started by | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| First post | 2017-09-13 02:00 +0200 |
| Last post | 2017-09-13 03:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 00/11] Kselftest make O=dir work Shuah Khan <shuahkh@osg.samsung.com> - 2017-09-13 02:00 +0200
[PATCH 04/11] selftests: lib.mk: fix test executable status check to use full path Shuah Khan <shuahkh@osg.samsung.com> - 2017-09-13 02:00 +0200
Re: [PATCH 00/11] Kselftest make O=dir work Greg KH <gregkh@linuxfoundation.org> - 2017-09-13 03:00 +0200
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2017-09-13 02:00 +0200 |
| Subject | [PATCH 00/11] Kselftest make O=dir work |
| Message-ID | <up3fY-83p-3@gated-at.bofh.it> |
During [MAINTAINERS SUMMIT] & [TECH TOPIC] Improve regression tracking
discussion, it was brought to my attention that kselftest lacks support
for make O=dir use-case which is used by several developers to relocate
objects and keep the source tree clean.
I mentioned in thread that I would take a look at what it takes to support
it and here is the patch series that does that.
This 11 patch series consists of fixes to get "make O=dir kselftest"
use-case working, extending the existing KBUILD_OUTPUT support.
Majority of the changes are made to kselftest common infrastructure.
Some test make files are changed as needed to address the custom build
and run_tests.
-- futex has sub-directories which require custom build and run_tests.
-- sync test needed a few changes to make use of lib.mk as much as possible
and still be able to run its custom build sequence.
With this series the following ways to build and run kselftest is possible:
-- Build all and Relocate objects to /tmp/kselftest and run tests:
make O=/tmp/kselftest kselftest
or
make KBUILD_OUTPUT=/tmp/kselftest kselftest
-- Build TARGETS and Relocate objects to /tmp/kselftest and run tests:
make O=/tmp/kselftest TARGETS="futex sync size" kselftest
or
make KBUILD_OUTPUT=/tmp/kselftest TARGETS="futex sync size" kselftest
-- Clean tests:
make O=/tmp/kselftest kselftest-clean
or
make KBUILD_OUTPUT=/tmp/kselftest kselftest-clean
All existing use-cases documented in Documentation/dev-tools/kselftest.rst
are still supported.
Shuah Khan (11):
Makefile: kselftest and kselftest-clean fail for make O=dir case
selftests: lib.mk: kselftest and kselftest-clean fail for make O=dir
case
selftests: Makefile: clear LDFLAGS for make O=dir use-case
selftests: lib.mk: fix test executable status check to use full path
selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean
selftests: lib.mk: add TEST_CUSTOM_PROGS to allow custom test
run/install
selftests: sync: use TEST_CUSTOM_PROGS instead of TEST_PROGS
selftests: sync: kselftest and kselftest-clean fail for make O=dir
case
selftests: lib.mk: copy test scripts and test files for make O=dir run
selftests: futex: copy sub-dir test scripts for make O=dir run
selftests: mqueue: Use full path to run tests from Makefile
Makefile | 13 ++++++---
tools/testing/selftests/Makefile | 4 +++
tools/testing/selftests/futex/Makefile | 5 +++-
tools/testing/selftests/lib.mk | 44 ++++++++++++++++++++++++++-----
tools/testing/selftests/mqueue/Makefile | 4 +--
tools/testing/selftests/sync/Makefile | 24 +++++++++++++----
tools/testing/selftests/watchdog/Makefile | 7 +----
7 files changed, 77 insertions(+), 24 deletions(-)
--
2.11.0
[toc] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2017-09-13 02:00 +0200 |
| Subject | [PATCH 04/11] selftests: lib.mk: fix test executable status check to use full path |
| Message-ID | <up3fZ-83p-25@gated-at.bofh.it> |
| In reply to | #1731298 |
Fix test executable status check to use full path for make O=dir case,m when tests are relocated to user specified object directory. Without the full path, this check fails to find the file and fails the test. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index e779c8758e15..22032ba802ba 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -21,7 +21,7 @@ define RUN_TESTS test_num=`echo $$test_num+1 | bc`; \ echo "selftests: $$BASENAME_TEST"; \ echo "========================================"; \ - if [ ! -x $$BASENAME_TEST ]; then \ + if [ ! -x $$TEST ]; then \ echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\ echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; \ else \ -- 2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-09-13 03:00 +0200 |
| Message-ID | <up4c2-bu-7@gated-at.bofh.it> |
| In reply to | #1731298 |
On Tue, Sep 12, 2017 at 05:52:53PM -0600, Shuah Khan wrote: > During [MAINTAINERS SUMMIT] & [TECH TOPIC] Improve regression tracking > discussion, it was brought to my attention that kselftest lacks support > for make O=dir use-case which is used by several developers to relocate > objects and keep the source tree clean. > > I mentioned in thread that I would take a look at what it takes to support > it and here is the patch series that does that. > > This 11 patch series consists of fixes to get "make O=dir kselftest" > use-case working, extending the existing KBUILD_OUTPUT support. > Majority of the changes are made to kselftest common infrastructure. > Some test make files are changed as needed to address the custom build > and run_tests. > > -- futex has sub-directories which require custom build and run_tests. > -- sync test needed a few changes to make use of lib.mk as much as possible > and still be able to run its custom build sequence. > > With this series the following ways to build and run kselftest is possible: > > -- Build all and Relocate objects to /tmp/kselftest and run tests: > make O=/tmp/kselftest kselftest > or > make KBUILD_OUTPUT=/tmp/kselftest kselftest > > -- Build TARGETS and Relocate objects to /tmp/kselftest and run tests: > make O=/tmp/kselftest TARGETS="futex sync size" kselftest > or > make KBUILD_OUTPUT=/tmp/kselftest TARGETS="futex sync size" kselftest > > -- Clean tests: > make O=/tmp/kselftest kselftest-clean > or > make KBUILD_OUTPUT=/tmp/kselftest kselftest-clean > > All existing use-cases documented in Documentation/dev-tools/kselftest.rst > are still supported. Yeah! Nice work. greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web