* [PATCH 0/3] tools: selftests cleanup
@ 2014-09-23 19:03 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:03 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
A couple of small patches to make working with selftests easier.
Peter Feiner (3):
tools: add .gitignore entries for selftests
tools: fix warning in memfd_test
tools: parallel selftests building & running
tools/testing/selftests/Makefile | 49 +++++++++++---------------
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/memfd/memfd_test.c | 2 +-
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/user/Makefile | 2 ++
tools/testing/selftests/vm/.gitignore | 9 ++---
8 files changed, 33 insertions(+), 34 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] tools: selftests cleanup
@ 2014-09-23 19:03 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:03 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
A couple of small patches to make working with selftests easier.
Peter Feiner (3):
tools: add .gitignore entries for selftests
tools: fix warning in memfd_test
tools: parallel selftests building & running
tools/testing/selftests/Makefile | 49 +++++++++++---------------
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/memfd/memfd_test.c | 2 +-
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/user/Makefile | 2 ++
tools/testing/selftests/vm/.gitignore | 9 ++---
8 files changed, 33 insertions(+), 34 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/3] tools: add .gitignore entries for selftests
2014-09-23 19:03 ` Peter Feiner
(?)
@ 2014-09-23 19:05 ` Peter Feiner
2014-09-23 19:05 ` Peter Feiner
` (2 more replies)
-1 siblings, 3 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:05 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/vm/.gitignore | 9 +++++----
5 files changed, 10 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
diff --git a/tools/testing/selftests/breakpoints/.gitignore b/tools/testing/selftests/breakpoints/.gitignore
new file mode 100644
index 0000000..ad66922
--- /dev/null
+++ b/tools/testing/selftests/breakpoints/.gitignore
@@ -0,0 +1 @@
+/breakpoint_test
diff --git a/tools/testing/selftests/efivarfs/.gitignore b/tools/testing/selftests/efivarfs/.gitignore
new file mode 100644
index 0000000..66c6e85
--- /dev/null
+++ b/tools/testing/selftests/efivarfs/.gitignore
@@ -0,0 +1,2 @@
+/create-read
+/open-unlink
diff --git a/tools/testing/selftests/ptrace/.gitignore b/tools/testing/selftests/ptrace/.gitignore
new file mode 100644
index 0000000..d348b86
--- /dev/null
+++ b/tools/testing/selftests/ptrace/.gitignore
@@ -0,0 +1 @@
+/peeksiginfo
diff --git a/tools/testing/selftests/timers/.gitignore b/tools/testing/selftests/timers/.gitignore
new file mode 100644
index 0000000..ac85e5b
--- /dev/null
+++ b/tools/testing/selftests/timers/.gitignore
@@ -0,0 +1 @@
+/posix_timers
diff --git a/tools/testing/selftests/vm/.gitignore b/tools/testing/selftests/vm/.gitignore
index ff1bb16..e57961f 100644
--- a/tools/testing/selftests/vm/.gitignore
+++ b/tools/testing/selftests/vm/.gitignore
@@ -1,4 +1,5 @@
-hugepage-mmap
-hugepage-shm
-map_hugetlb
-thuge-gen
+/hugepage-mmap
+/hugepage-shm
+/map_hugetlb
+/thuge-gen
+/hugetlbfstest
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] tools: fix warning in memfd_test
@ 2014-09-23 19:05 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:05 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
No arguments given after printf format string with "%s" conversion.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
There are a couple of patches floating around for this one. I'm just
including it so somebody that applies this patch series doesn't get a
broken build :-)
---
tools/testing/selftests/memfd/memfd_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 3634c90..c343df8 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -205,7 +205,7 @@ static void mfd_fail_open(int fd, int flags, mode_t mode)
sprintf(buf, "/proc/self/fd/%d", fd);
r = open(buf, flags, mode);
if (r >= 0) {
- printf("open(%s) didn't fail as expected\n");
+ printf("open(%s) didn't fail as expected\n", buf);
abort();
}
}
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] tools: fix warning in memfd_test
@ 2014-09-23 19:05 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:05 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
No arguments given after printf format string with "%s" conversion.
Signed-off-by: Peter Feiner <pfeiner-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
---
There are a couple of patches floating around for this one. I'm just
including it so somebody that applies this patch series doesn't get a
broken build :-)
---
tools/testing/selftests/memfd/memfd_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 3634c90..c343df8 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -205,7 +205,7 @@ static void mfd_fail_open(int fd, int flags, mode_t mode)
sprintf(buf, "/proc/self/fd/%d", fd);
r = open(buf, flags, mode);
if (r >= 0) {
- printf("open(%s) didn't fail as expected\n");
+ printf("open(%s) didn't fail as expected\n", buf);
abort();
}
}
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/3] tools: parallel selftests building & running
@ 2014-09-23 19:05 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:05 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Now make -jN builds and runs selftests in parallel. Also, if one
selftest fails to build or run, make will return an error, whereas
before the error was ignored.
Also added missing clean target to user/Makefile so 'make clean' doesn't fail.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
tools/testing/selftests/Makefile | 49 ++++++++++++++---------------------
tools/testing/selftests/user/Makefile | 2 ++
2 files changed, 22 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 36ff2e4..8c33716 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -18,32 +18,23 @@ TARGETS += firmware
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
-all:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET; \
- done;
-
-run_tests: all
- for TARGET in $(TARGETS); do \
- make -C $$TARGET run_tests; \
- done;
-
-hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET; \
- done;
-
-run_hotplug: hotplug
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET run_full_test; \
- done;
-
-clean_hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET clean; \
- done;
-
-clean:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET clean; \
- done;
+BUILD_TARGETS=$(TARGETS:%=build-%) $(TARGETS_HOTPLUG:%=build-%)
+TEST_TARGETS=$(TARGETS:%=test-%)
+CLEAN_TARGETS=$(TARGETS:%=clean-%) $(TARGETS_HOTPLUG:%=clean-%)
+
+all: $(BUILD_TARGETS)
+
+run_hotplug: test-cpu-hotplug test-memory-hotplug
+
+run_tests: $(TEST_TARGETS)
+
+clean: $(CLEAN_TARGETS)
+
+build-%:
+ $(MAKE) -C $(@:build-%=%)
+
+test-%: build-%
+ $(MAKE) -C $(@:test-%=%) run_tests
+
+clean-%:
+ $(MAKE) -C $(@:clean-%=%) clean
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..8eb6583 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -3,6 +3,8 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
+clean:
+
run_tests: all
@if /sbin/modprobe test_user_copy ; then \
rmmod test_user_copy; \
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/3] tools: parallel selftests building & running
@ 2014-09-23 19:05 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:05 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Now make -jN builds and runs selftests in parallel. Also, if one
selftest fails to build or run, make will return an error, whereas
before the error was ignored.
Also added missing clean target to user/Makefile so 'make clean' doesn't fail.
Signed-off-by: Peter Feiner <pfeiner-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
---
tools/testing/selftests/Makefile | 49 ++++++++++++++---------------------
tools/testing/selftests/user/Makefile | 2 ++
2 files changed, 22 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 36ff2e4..8c33716 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -18,32 +18,23 @@ TARGETS += firmware
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
-all:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET; \
- done;
-
-run_tests: all
- for TARGET in $(TARGETS); do \
- make -C $$TARGET run_tests; \
- done;
-
-hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET; \
- done;
-
-run_hotplug: hotplug
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET run_full_test; \
- done;
-
-clean_hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET clean; \
- done;
-
-clean:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET clean; \
- done;
+BUILD_TARGETS=$(TARGETS:%=build-%) $(TARGETS_HOTPLUG:%=build-%)
+TEST_TARGETS=$(TARGETS:%=test-%)
+CLEAN_TARGETS=$(TARGETS:%=clean-%) $(TARGETS_HOTPLUG:%=clean-%)
+
+all: $(BUILD_TARGETS)
+
+run_hotplug: test-cpu-hotplug test-memory-hotplug
+
+run_tests: $(TEST_TARGETS)
+
+clean: $(CLEAN_TARGETS)
+
+build-%:
+ $(MAKE) -C $(@:build-%=%)
+
+test-%: build-%
+ $(MAKE) -C $(@:test-%=%) run_tests
+
+clean-%:
+ $(MAKE) -C $(@:clean-%=%) clean
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..8eb6583 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -3,6 +3,8 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
+clean:
+
run_tests: all
@if /sbin/modprobe test_user_copy ; then \
rmmod test_user_copy; \
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 1/3] tools: add .gitignore entries for selftests
@ 2014-09-23 19:39 ` Shuah Khan
0 siblings, 0 replies; 24+ messages in thread
From: Shuah Khan @ 2014-09-23 19:39 UTC (permalink / raw)
To: Peter Feiner
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Shuah Khan
On 09/23/2014 01:05 PM, Peter Feiner wrote:
> Signed-off-by: Peter Feiner <pfeiner@google.com>
> ---
Please add a change log describing what this does and
why it is needed. I know what you trying to fix, and
that is a good one, but would like a log with the patch.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/3] tools: add .gitignore entries for selftests
@ 2014-09-23 19:39 ` Shuah Khan
0 siblings, 0 replies; 24+ messages in thread
From: Shuah Khan @ 2014-09-23 19:39 UTC (permalink / raw)
To: Peter Feiner
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Shuah Khan
On 09/23/2014 01:05 PM, Peter Feiner wrote:
> Signed-off-by: Peter Feiner <pfeiner-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> ---
Please add a change log describing what this does and
why it is needed. I know what you trying to fix, and
that is a good one, but would like a log with the patch.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tools: fix warning in memfd_test
@ 2014-09-23 19:40 ` Shuah Khan
0 siblings, 0 replies; 24+ messages in thread
From: Shuah Khan @ 2014-09-23 19:40 UTC (permalink / raw)
To: Peter Feiner
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Shuah Khan
On 09/23/2014 01:05 PM, Peter Feiner wrote:
> No arguments given after printf format string with "%s" conversion.
>
> Signed-off-by: Peter Feiner <pfeiner@google.com>
>
> ---
Please drop this one from the series. It is merged into linux-next
(in linux-kselfest fixes branch) queued for next merge window.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tools: fix warning in memfd_test
@ 2014-09-23 19:40 ` Shuah Khan
0 siblings, 0 replies; 24+ messages in thread
From: Shuah Khan @ 2014-09-23 19:40 UTC (permalink / raw)
To: Peter Feiner
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Shuah Khan
On 09/23/2014 01:05 PM, Peter Feiner wrote:
> No arguments given after printf format string with "%s" conversion.
>
> Signed-off-by: Peter Feiner <pfeiner-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>
> ---
Please drop this one from the series. It is merged into linux-next
(in linux-kselfest fixes branch) queued for next merge window.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] tools: parallel selftests building & running
2014-09-23 19:05 ` Peter Feiner
(?)
@ 2014-09-23 19:42 ` Shuah Khan
-1 siblings, 0 replies; 24+ messages in thread
From: Shuah Khan @ 2014-09-23 19:42 UTC (permalink / raw)
To: Peter Feiner
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Shuah Khan
On 09/23/2014 01:05 PM, Peter Feiner wrote:
> Now make -jN builds and runs selftests in parallel. Also, if one
> selftest fails to build or run, make will return an error, whereas
> before the error was ignored.
>
> Also added missing clean target to user/Makefile so 'make clean' doesn't fail.
>
Could you please split this into two patches. One for parallel
builds and the second for adding missing clean targets.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2 0/3] tools: selftests cleanup
2014-09-23 19:03 ` Peter Feiner
(?)
(?)
@ 2014-09-23 19:55 ` Peter Feiner
2014-09-23 19:55 ` [PATCH v2 1/3] tools: add .gitignore entries for selftests Peter Feiner
` (2 more replies)
-1 siblings, 3 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:55 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
A couple of small patches to make working with selftests easier.
v1 -> v2:
Addressed Shuah's comments.
Peter Feiner (3):
tools: add .gitignore entries for selftests
tools: adding clean target to user selftest
tools: parallel selftests building & running
tools/testing/selftests/Makefile | 49 +++++++++++---------------
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/mount/.gitignore | 1 +
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/user/Makefile | 2 ++
tools/testing/selftests/vm/.gitignore | 9 ++---
8 files changed, 33 insertions(+), 33 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/mount/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2 1/3] tools: add .gitignore entries for selftests
2014-09-23 19:55 ` [PATCH v2 0/3] tools: selftests cleanup Peter Feiner
@ 2014-09-23 19:55 ` Peter Feiner
2014-09-23 19:55 ` Peter Feiner
2014-09-23 19:55 ` Peter Feiner
2 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:55 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Ignore the binaries built for selftests in 'git status' output to make
development more pleasant. Without this patch, you see
tools/testing/selftests/breakpoints/breakpoint_test
tools/testing/selftests/efivarfs/create-read
tools/testing/selftests/efivarfs/open-unlink
tools/testing/selftests/kcmp/kcmp_test
tools/testing/selftests/memfd/memfd_test
tools/testing/selftests/mqueue/mq_open_tests
tools/testing/selftests/mqueue/mq_perf_tests
tools/testing/selftests/net/psock_fanout
tools/testing/selftests/net/psock_tpacket
tools/testing/selftests/net/socket
tools/testing/selftests/ptrace/peeksiginfo
tools/testing/selftests/timers/posix_timers
tools/testing/selftests/vm/hugepage-mmap
tools/testing/selftests/vm/hugepage-shm
tools/testing/selftests/vm/hugetlbfstest
tools/testing/selftests/vm/map_hugetlb
tools/testing/selftests/vm/thuge-gen
tools/testing/selftests/mount/unprivileged-remount-test
in the list of untracked files.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
v1 -> v2:
* added changelog blurb
* added mount/.gitignore for unprivileged-remount-test
---
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/mount/.gitignore | 1 +
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/vm/.gitignore | 9 +++++----
6 files changed, 11 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/mount/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
diff --git a/tools/testing/selftests/breakpoints/.gitignore b/tools/testing/selftests/breakpoints/.gitignore
new file mode 100644
index 0000000..ad66922
--- /dev/null
+++ b/tools/testing/selftests/breakpoints/.gitignore
@@ -0,0 +1 @@
+/breakpoint_test
diff --git a/tools/testing/selftests/efivarfs/.gitignore b/tools/testing/selftests/efivarfs/.gitignore
new file mode 100644
index 0000000..66c6e85
--- /dev/null
+++ b/tools/testing/selftests/efivarfs/.gitignore
@@ -0,0 +1,2 @@
+/create-read
+/open-unlink
diff --git a/tools/testing/selftests/mount/.gitignore b/tools/testing/selftests/mount/.gitignore
new file mode 100644
index 0000000..7ffb29f
--- /dev/null
+++ b/tools/testing/selftests/mount/.gitignore
@@ -0,0 +1 @@
+/unprivileged-remount-test
diff --git a/tools/testing/selftests/ptrace/.gitignore b/tools/testing/selftests/ptrace/.gitignore
new file mode 100644
index 0000000..d348b86
--- /dev/null
+++ b/tools/testing/selftests/ptrace/.gitignore
@@ -0,0 +1 @@
+/peeksiginfo
diff --git a/tools/testing/selftests/timers/.gitignore b/tools/testing/selftests/timers/.gitignore
new file mode 100644
index 0000000..ac85e5b
--- /dev/null
+++ b/tools/testing/selftests/timers/.gitignore
@@ -0,0 +1 @@
+/posix_timers
diff --git a/tools/testing/selftests/vm/.gitignore b/tools/testing/selftests/vm/.gitignore
index ff1bb16..e57961f 100644
--- a/tools/testing/selftests/vm/.gitignore
+++ b/tools/testing/selftests/vm/.gitignore
@@ -1,4 +1,5 @@
-hugepage-mmap
-hugepage-shm
-map_hugetlb
-thuge-gen
+/hugepage-mmap
+/hugepage-shm
+/map_hugetlb
+/thuge-gen
+/hugetlbfstest
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 2/3] tools: adding clean target to user selftest
@ 2014-09-23 19:55 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:55 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Gets rid of this error when running 'make clean' in the selftests
directory:
make[1]: Entering directory `.../tools/testing/selftests/user'
make[1]: *** No rule to make target `clean'. Stop.
---
v1 -> v2:
Separated this from the parallel build patch.
---
tools/testing/selftests/user/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..8eb6583 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -3,6 +3,8 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
+clean:
+
run_tests: all
@if /sbin/modprobe test_user_copy ; then \
rmmod test_user_copy; \
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 2/3] tools: adding clean target to user selftest
@ 2014-09-23 19:55 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:55 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Gets rid of this error when running 'make clean' in the selftests
directory:
make[1]: Entering directory `.../tools/testing/selftests/user'
make[1]: *** No rule to make target `clean'. Stop.
---
v1 -> v2:
Separated this from the parallel build patch.
---
tools/testing/selftests/user/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..8eb6583 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -3,6 +3,8 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
+clean:
+
run_tests: all
@if /sbin/modprobe test_user_copy ; then \
rmmod test_user_copy; \
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 3/3] tools: parallel selftests building & running
@ 2014-09-23 19:55 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:55 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Now make -jN builds and runs selftests in parallel. Also, if one
selftest fails to build or run, make will return an error, whereas
before the error was ignored.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
v1 -> v2:
Moved fix for missing 'make clean' target into separate
patch.
---
tools/testing/selftests/Makefile | 49 ++++++++++++++++------------------------
1 file changed, 20 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 36ff2e4..8c33716 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -18,32 +18,23 @@ TARGETS += firmware
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
-all:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET; \
- done;
-
-run_tests: all
- for TARGET in $(TARGETS); do \
- make -C $$TARGET run_tests; \
- done;
-
-hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET; \
- done;
-
-run_hotplug: hotplug
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET run_full_test; \
- done;
-
-clean_hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET clean; \
- done;
-
-clean:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET clean; \
- done;
+BUILD_TARGETS=$(TARGETS:%=build-%) $(TARGETS_HOTPLUG:%=build-%)
+TEST_TARGETS=$(TARGETS:%=test-%)
+CLEAN_TARGETS=$(TARGETS:%=clean-%) $(TARGETS_HOTPLUG:%=clean-%)
+
+all: $(BUILD_TARGETS)
+
+run_hotplug: test-cpu-hotplug test-memory-hotplug
+
+run_tests: $(TEST_TARGETS)
+
+clean: $(CLEAN_TARGETS)
+
+build-%:
+ $(MAKE) -C $(@:build-%=%)
+
+test-%: build-%
+ $(MAKE) -C $(@:test-%=%) run_tests
+
+clean-%:
+ $(MAKE) -C $(@:clean-%=%) clean
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 3/3] tools: parallel selftests building & running
@ 2014-09-23 19:55 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-23 19:55 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Now make -jN builds and runs selftests in parallel. Also, if one
selftest fails to build or run, make will return an error, whereas
before the error was ignored.
Signed-off-by: Peter Feiner <pfeiner-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
---
v1 -> v2:
Moved fix for missing 'make clean' target into separate
patch.
---
tools/testing/selftests/Makefile | 49 ++++++++++++++++------------------------
1 file changed, 20 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 36ff2e4..8c33716 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -18,32 +18,23 @@ TARGETS += firmware
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
-all:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET; \
- done;
-
-run_tests: all
- for TARGET in $(TARGETS); do \
- make -C $$TARGET run_tests; \
- done;
-
-hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET; \
- done;
-
-run_hotplug: hotplug
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET run_full_test; \
- done;
-
-clean_hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET clean; \
- done;
-
-clean:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET clean; \
- done;
+BUILD_TARGETS=$(TARGETS:%=build-%) $(TARGETS_HOTPLUG:%=build-%)
+TEST_TARGETS=$(TARGETS:%=test-%)
+CLEAN_TARGETS=$(TARGETS:%=clean-%) $(TARGETS_HOTPLUG:%=clean-%)
+
+all: $(BUILD_TARGETS)
+
+run_hotplug: test-cpu-hotplug test-memory-hotplug
+
+run_tests: $(TEST_TARGETS)
+
+clean: $(CLEAN_TARGETS)
+
+build-%:
+ $(MAKE) -C $(@:build-%=%)
+
+test-%: build-%
+ $(MAKE) -C $(@:test-%=%) run_tests
+
+clean-%:
+ $(MAKE) -C $(@:clean-%=%) clean
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] tools: adding clean target to user selftest
2014-09-23 19:55 ` Peter Feiner
(?)
@ 2014-09-24 17:20 ` Shuah Khan
-1 siblings, 0 replies; 24+ messages in thread
From: Shuah Khan @ 2014-09-24 17:20 UTC (permalink / raw)
To: Peter Feiner
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Shuah Khan
On 09/23/2014 01:55 PM, Peter Feiner wrote:
> Gets rid of this error when running 'make clean' in the selftests
> directory:
>
> make[1]: Entering directory `.../tools/testing/selftests/user'
> make[1]: *** No rule to make target `clean'. Stop.
>
Signed-off is missing. Please make sure patches have
your Signed-off
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2 0/3] tools: selftests cleanup
2014-09-23 19:03 ` Peter Feiner
` (2 preceding siblings ...)
(?)
@ 2014-09-24 19:42 ` Peter Feiner
2014-09-24 19:42 ` Peter Feiner
` (2 more replies)
-1 siblings, 3 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-24 19:42 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
A couple of small patches to make working with selftests easier.
v1 -> v2:
Addressed Shuah's comments.
v2 -> v3:
Forgot Signed-off-by footer.
*** BLURB HERE ***
Peter Feiner (3):
tools: add .gitignore entries for selftests
tools: adding clean target to user selftest
tools: parallel selftests building & running
tools/testing/selftests/Makefile | 49 +++++++++++---------------
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/mount/.gitignore | 1 +
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/user/Makefile | 2 ++
tools/testing/selftests/vm/.gitignore | 9 ++---
8 files changed, 33 insertions(+), 33 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/mount/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v3 1/3] tools: add .gitignore entries for selftests
@ 2014-09-24 19:42 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-24 19:42 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Ignore the binaries built for selftests in 'git status' output to make
development more pleasant. Without this patch, you see
tools/testing/selftests/breakpoints/breakpoint_test
tools/testing/selftests/efivarfs/create-read
tools/testing/selftests/efivarfs/open-unlink
tools/testing/selftests/kcmp/kcmp_test
tools/testing/selftests/memfd/memfd_test
tools/testing/selftests/mqueue/mq_open_tests
tools/testing/selftests/mqueue/mq_perf_tests
tools/testing/selftests/net/psock_fanout
tools/testing/selftests/net/psock_tpacket
tools/testing/selftests/net/socket
tools/testing/selftests/ptrace/peeksiginfo
tools/testing/selftests/timers/posix_timers
tools/testing/selftests/vm/hugepage-mmap
tools/testing/selftests/vm/hugepage-shm
tools/testing/selftests/vm/hugetlbfstest
tools/testing/selftests/vm/map_hugetlb
tools/testing/selftests/vm/thuge-gen
tools/testing/selftests/mount/unprivileged-remount-test
in the list of untracked files.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
v1 -> v2:
* added changelog blurb
* added mount/.gitignore for unprivileged-remount-test
---
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/mount/.gitignore | 1 +
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/vm/.gitignore | 9 +++++----
6 files changed, 11 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/mount/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
diff --git a/tools/testing/selftests/breakpoints/.gitignore b/tools/testing/selftests/breakpoints/.gitignore
new file mode 100644
index 0000000..ad66922
--- /dev/null
+++ b/tools/testing/selftests/breakpoints/.gitignore
@@ -0,0 +1 @@
+/breakpoint_test
diff --git a/tools/testing/selftests/efivarfs/.gitignore b/tools/testing/selftests/efivarfs/.gitignore
new file mode 100644
index 0000000..66c6e85
--- /dev/null
+++ b/tools/testing/selftests/efivarfs/.gitignore
@@ -0,0 +1,2 @@
+/create-read
+/open-unlink
diff --git a/tools/testing/selftests/mount/.gitignore b/tools/testing/selftests/mount/.gitignore
new file mode 100644
index 0000000..7ffb29f
--- /dev/null
+++ b/tools/testing/selftests/mount/.gitignore
@@ -0,0 +1 @@
+/unprivileged-remount-test
diff --git a/tools/testing/selftests/ptrace/.gitignore b/tools/testing/selftests/ptrace/.gitignore
new file mode 100644
index 0000000..d348b86
--- /dev/null
+++ b/tools/testing/selftests/ptrace/.gitignore
@@ -0,0 +1 @@
+/peeksiginfo
diff --git a/tools/testing/selftests/timers/.gitignore b/tools/testing/selftests/timers/.gitignore
new file mode 100644
index 0000000..ac85e5b
--- /dev/null
+++ b/tools/testing/selftests/timers/.gitignore
@@ -0,0 +1 @@
+/posix_timers
diff --git a/tools/testing/selftests/vm/.gitignore b/tools/testing/selftests/vm/.gitignore
index ff1bb16..e57961f 100644
--- a/tools/testing/selftests/vm/.gitignore
+++ b/tools/testing/selftests/vm/.gitignore
@@ -1,4 +1,5 @@
-hugepage-mmap
-hugepage-shm
-map_hugetlb
-thuge-gen
+/hugepage-mmap
+/hugepage-shm
+/map_hugetlb
+/thuge-gen
+/hugetlbfstest
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 1/3] tools: add .gitignore entries for selftests
@ 2014-09-24 19:42 ` Peter Feiner
0 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-24 19:42 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Ignore the binaries built for selftests in 'git status' output to make
development more pleasant. Without this patch, you see
tools/testing/selftests/breakpoints/breakpoint_test
tools/testing/selftests/efivarfs/create-read
tools/testing/selftests/efivarfs/open-unlink
tools/testing/selftests/kcmp/kcmp_test
tools/testing/selftests/memfd/memfd_test
tools/testing/selftests/mqueue/mq_open_tests
tools/testing/selftests/mqueue/mq_perf_tests
tools/testing/selftests/net/psock_fanout
tools/testing/selftests/net/psock_tpacket
tools/testing/selftests/net/socket
tools/testing/selftests/ptrace/peeksiginfo
tools/testing/selftests/timers/posix_timers
tools/testing/selftests/vm/hugepage-mmap
tools/testing/selftests/vm/hugepage-shm
tools/testing/selftests/vm/hugetlbfstest
tools/testing/selftests/vm/map_hugetlb
tools/testing/selftests/vm/thuge-gen
tools/testing/selftests/mount/unprivileged-remount-test
in the list of untracked files.
Signed-off-by: Peter Feiner <pfeiner-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
---
v1 -> v2:
* added changelog blurb
* added mount/.gitignore for unprivileged-remount-test
---
tools/testing/selftests/breakpoints/.gitignore | 1 +
tools/testing/selftests/efivarfs/.gitignore | 2 ++
tools/testing/selftests/mount/.gitignore | 1 +
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/vm/.gitignore | 9 +++++----
6 files changed, 11 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/breakpoints/.gitignore
create mode 100644 tools/testing/selftests/efivarfs/.gitignore
create mode 100644 tools/testing/selftests/mount/.gitignore
create mode 100644 tools/testing/selftests/ptrace/.gitignore
create mode 100644 tools/testing/selftests/timers/.gitignore
diff --git a/tools/testing/selftests/breakpoints/.gitignore b/tools/testing/selftests/breakpoints/.gitignore
new file mode 100644
index 0000000..ad66922
--- /dev/null
+++ b/tools/testing/selftests/breakpoints/.gitignore
@@ -0,0 +1 @@
+/breakpoint_test
diff --git a/tools/testing/selftests/efivarfs/.gitignore b/tools/testing/selftests/efivarfs/.gitignore
new file mode 100644
index 0000000..66c6e85
--- /dev/null
+++ b/tools/testing/selftests/efivarfs/.gitignore
@@ -0,0 +1,2 @@
+/create-read
+/open-unlink
diff --git a/tools/testing/selftests/mount/.gitignore b/tools/testing/selftests/mount/.gitignore
new file mode 100644
index 0000000..7ffb29f
--- /dev/null
+++ b/tools/testing/selftests/mount/.gitignore
@@ -0,0 +1 @@
+/unprivileged-remount-test
diff --git a/tools/testing/selftests/ptrace/.gitignore b/tools/testing/selftests/ptrace/.gitignore
new file mode 100644
index 0000000..d348b86
--- /dev/null
+++ b/tools/testing/selftests/ptrace/.gitignore
@@ -0,0 +1 @@
+/peeksiginfo
diff --git a/tools/testing/selftests/timers/.gitignore b/tools/testing/selftests/timers/.gitignore
new file mode 100644
index 0000000..ac85e5b
--- /dev/null
+++ b/tools/testing/selftests/timers/.gitignore
@@ -0,0 +1 @@
+/posix_timers
diff --git a/tools/testing/selftests/vm/.gitignore b/tools/testing/selftests/vm/.gitignore
index ff1bb16..e57961f 100644
--- a/tools/testing/selftests/vm/.gitignore
+++ b/tools/testing/selftests/vm/.gitignore
@@ -1,4 +1,5 @@
-hugepage-mmap
-hugepage-shm
-map_hugetlb
-thuge-gen
+/hugepage-mmap
+/hugepage-shm
+/map_hugetlb
+/thuge-gen
+/hugetlbfstest
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 2/3] tools: adding clean target to user selftest
2014-09-24 19:42 ` [PATCH v2 0/3] tools: selftests cleanup Peter Feiner
2014-09-24 19:42 ` Peter Feiner
@ 2014-09-24 19:42 ` Peter Feiner
2014-09-24 19:42 ` [PATCH v3 3/3] tools: parallel selftests building & running Peter Feiner
2 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-24 19:42 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Gets rid of this error when running 'make clean' in the selftests
directory:
make[1]: Entering directory `.../tools/testing/selftests/user'
make[1]: *** No rule to make target `clean'. Stop.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
v1 -> v2:
Separated this from the parallel build patch.
v2 -> v3:
Added Signed-off-by.
---
tools/testing/selftests/user/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..8eb6583 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -3,6 +3,8 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
+clean:
+
run_tests: all
@if /sbin/modprobe test_user_copy ; then \
rmmod test_user_copy; \
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 3/3] tools: parallel selftests building & running
2014-09-24 19:42 ` [PATCH v2 0/3] tools: selftests cleanup Peter Feiner
2014-09-24 19:42 ` Peter Feiner
2014-09-24 19:42 ` [PATCH v3 2/3] tools: adding clean target to user selftest Peter Feiner
@ 2014-09-24 19:42 ` Peter Feiner
2 siblings, 0 replies; 24+ messages in thread
From: Peter Feiner @ 2014-09-24 19:42 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-api, linux-kernel, David Herrmann, Greg Thelen,
Hugh Dickens, Andrew Morton, Peter Feiner
Now make -jN builds and runs selftests in parallel. Also, if one
selftest fails to build or run, make will return an error, whereas
before the error was ignored.
Signed-off-by: Peter Feiner <pfeiner@google.com>
---
v1 -> v2:
Moved fix for missing 'make clean' target into separate
patch.
---
tools/testing/selftests/Makefile | 49 ++++++++++++++++------------------------
1 file changed, 20 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 36ff2e4..8c33716 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -18,32 +18,23 @@ TARGETS += firmware
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
-all:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET; \
- done;
-
-run_tests: all
- for TARGET in $(TARGETS); do \
- make -C $$TARGET run_tests; \
- done;
-
-hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET; \
- done;
-
-run_hotplug: hotplug
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET run_full_test; \
- done;
-
-clean_hotplug:
- for TARGET in $(TARGETS_HOTPLUG); do \
- make -C $$TARGET clean; \
- done;
-
-clean:
- for TARGET in $(TARGETS); do \
- make -C $$TARGET clean; \
- done;
+BUILD_TARGETS=$(TARGETS:%=build-%) $(TARGETS_HOTPLUG:%=build-%)
+TEST_TARGETS=$(TARGETS:%=test-%)
+CLEAN_TARGETS=$(TARGETS:%=clean-%) $(TARGETS_HOTPLUG:%=clean-%)
+
+all: $(BUILD_TARGETS)
+
+run_hotplug: test-cpu-hotplug test-memory-hotplug
+
+run_tests: $(TEST_TARGETS)
+
+clean: $(CLEAN_TARGETS)
+
+build-%:
+ $(MAKE) -C $(@:build-%=%)
+
+test-%: build-%
+ $(MAKE) -C $(@:test-%=%) run_tests
+
+clean-%:
+ $(MAKE) -C $(@:clean-%=%) clean
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 24+ messages in thread
end of thread, other threads:[~2014-09-24 19:43 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23 19:03 [PATCH 0/3] tools: selftests cleanup Peter Feiner
2014-09-23 19:03 ` Peter Feiner
2014-09-23 19:05 ` [PATCH 1/3] tools: add .gitignore entries for selftests Peter Feiner
2014-09-23 19:05 ` [PATCH 2/3] tools: fix warning in memfd_test Peter Feiner
2014-09-23 19:05 ` Peter Feiner
2014-09-23 19:40 ` Shuah Khan
2014-09-23 19:40 ` Shuah Khan
2014-09-23 19:05 ` [PATCH 3/3] tools: parallel selftests building & running Peter Feiner
2014-09-23 19:05 ` Peter Feiner
2014-09-23 19:42 ` Shuah Khan
2014-09-23 19:39 ` [PATCH 1/3] tools: add .gitignore entries for selftests Shuah Khan
2014-09-23 19:39 ` Shuah Khan
2014-09-23 19:55 ` [PATCH v2 0/3] tools: selftests cleanup Peter Feiner
2014-09-23 19:55 ` [PATCH v2 1/3] tools: add .gitignore entries for selftests Peter Feiner
2014-09-23 19:55 ` [PATCH v2 2/3] tools: adding clean target to user selftest Peter Feiner
2014-09-23 19:55 ` Peter Feiner
2014-09-24 17:20 ` Shuah Khan
2014-09-23 19:55 ` [PATCH v2 3/3] tools: parallel selftests building & running Peter Feiner
2014-09-23 19:55 ` Peter Feiner
2014-09-24 19:42 ` [PATCH v2 0/3] tools: selftests cleanup Peter Feiner
2014-09-24 19:42 ` [PATCH v3 1/3] tools: add .gitignore entries for selftests Peter Feiner
2014-09-24 19:42 ` Peter Feiner
2014-09-24 19:42 ` [PATCH v3 2/3] tools: adding clean target to user selftest Peter Feiner
2014-09-24 19:42 ` [PATCH v3 3/3] tools: parallel selftests building & running Peter Feiner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.