* [PATCH V2 0/3] Clean up and enable two testcases in kselftest
@ 2015-11-17 14:35 Bamvor Jian Zhang
[not found] ` <1447770943-10059-1-git-send-email-bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Bamvor Jian Zhang @ 2015-11-17 14:35 UTC (permalink / raw)
To: linux-api-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, khilman-QSEj5FYQhm4dnm+yROfE0A,
tyler.baker-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A, mpe-Gsx/Oe8HsFggBc27wqDAHg,
Bamvor Jian Zhang
These patches try to enable two testcases (capabilities and ipc) and
make them build successful in cross compiling environment.
Clean up the Makefile of capabilities according to the usage in
kselftest.
Changes since v1
1. Update Makefile of capabilities according to Michael's suggestion.
reference commit message for details.
Bamvor Jian Zhang (3):
selftests/capabilities: clean up for Makefile
selftests/capabilities: actually test it
selftest/ipc: actually test it
tools/testing/selftests/Makefile | 2 ++
tools/testing/selftests/capabilities/Makefile | 21 +++++++++------------
2 files changed, 11 insertions(+), 12 deletions(-)
--
1.8.4.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V2 1/3] selftests/capabilities: clean up for Makefile
[not found] ` <1447770943-10059-1-git-send-email-bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2015-11-17 14:35 ` Bamvor Jian Zhang
2015-11-17 14:35 ` [PATCH V2 2/3] selftests/capabilities: actually test it Bamvor Jian Zhang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bamvor Jian Zhang @ 2015-11-17 14:35 UTC (permalink / raw)
To: linux-api-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, khilman-QSEj5FYQhm4dnm+yROfE0A,
tyler.baker-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A, mpe-Gsx/Oe8HsFggBc27wqDAHg,
Bamvor Jian Zhang
Clean up the following things:
1. Avoid the broken when use TARGETS in the command line, eg:
$ make -C tools/testing/selftests TARGETS=capabilities
make[1]: *** No rule to make target 'capabilities', needed by 'all'. Stop.
Replace TARGETS with BINARIES.
2. User need to provide cap-ng.h and libcap-ng.so for cross compiling.
Replace ':=' with '+=' for CFLAGS and introduce LDLIBS to archieve
it. Delete useless EXTRA_CLAGS at the same time.
3. Delete the duplicated definition which is already defined by
lib.mk.
Suggested-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
tools/testing/selftests/capabilities/Makefile | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/capabilities/Makefile b/tools/testing/selftests/capabilities/Makefile
index 8c8f0c1..008602a 100644
--- a/tools/testing/selftests/capabilities/Makefile
+++ b/tools/testing/selftests/capabilities/Makefile
@@ -1,18 +1,15 @@
-all:
-
-include ../lib.mk
-
-.PHONY: all clean
-
-TARGETS := validate_cap test_execve
+TEST_FILES := validate_cap
TEST_PROGS := test_execve
-CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng
+BINARIES := $(TEST_FILES) $(TEST_PROGS)
-all: $(TARGETS)
+CFLAGS += -O2 -g -std=gnu99 -Wall
+LDLIBS += -lcap-ng -lrt -ldl
+
+all: $(BINARIES)
clean:
- $(RM) $(TARGETS)
+ $(RM) $(BINARIES)
+
+include ../lib.mk
-$(TARGETS): %: %.c
- $(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 2/3] selftests/capabilities: actually test it
[not found] ` <1447770943-10059-1-git-send-email-bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-11-17 14:35 ` [PATCH V2 1/3] selftests/capabilities: clean up for Makefile Bamvor Jian Zhang
@ 2015-11-17 14:35 ` Bamvor Jian Zhang
2015-11-17 14:35 ` [PATCH V2 3/3] selftest/ipc: " Bamvor Jian Zhang
2015-11-23 20:33 ` [PATCH V2 0/3] Clean up and enable two testcases in kselftest Shuah Khan
3 siblings, 0 replies; 5+ messages in thread
From: Bamvor Jian Zhang @ 2015-11-17 14:35 UTC (permalink / raw)
To: linux-api-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, khilman-QSEj5FYQhm4dnm+yROfE0A,
tyler.baker-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A, mpe-Gsx/Oe8HsFggBc27wqDAHg,
Bamvor Jian Zhang
The capatabilities exist in selftest but no in the TARGETS list.
Add it to the TARGETS.
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
tools/testing/selftests/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index c8edff6..ec0ecad 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -1,4 +1,5 @@
TARGETS = breakpoints
+TARGETS += capabilities
TARGETS += cpu-hotplug
TARGETS += efivarfs
TARGETS += exec
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 3/3] selftest/ipc: actually test it
[not found] ` <1447770943-10059-1-git-send-email-bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-11-17 14:35 ` [PATCH V2 1/3] selftests/capabilities: clean up for Makefile Bamvor Jian Zhang
2015-11-17 14:35 ` [PATCH V2 2/3] selftests/capabilities: actually test it Bamvor Jian Zhang
@ 2015-11-17 14:35 ` Bamvor Jian Zhang
2015-11-23 20:33 ` [PATCH V2 0/3] Clean up and enable two testcases in kselftest Shuah Khan
3 siblings, 0 replies; 5+ messages in thread
From: Bamvor Jian Zhang @ 2015-11-17 14:35 UTC (permalink / raw)
To: linux-api-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, khilman-QSEj5FYQhm4dnm+yROfE0A,
tyler.baker-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A, mpe-Gsx/Oe8HsFggBc27wqDAHg,
Bamvor Jian Zhang
The ipc testcase exist in selftest but no in the TARGETS list.
Add it to the TARGETS.
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
tools/testing/selftests/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index ec0ecad..b04afc3 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -6,6 +6,7 @@ TARGETS += exec
TARGETS += firmware
TARGETS += ftrace
TARGETS += futex
+TARGETS += ipc
TARGETS += kcmp
TARGETS += lib
TARGETS += membarrier
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V2 0/3] Clean up and enable two testcases in kselftest
[not found] ` <1447770943-10059-1-git-send-email-bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
` (2 preceding siblings ...)
2015-11-17 14:35 ` [PATCH V2 3/3] selftest/ipc: " Bamvor Jian Zhang
@ 2015-11-23 20:33 ` Shuah Khan
3 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2015-11-23 20:33 UTC (permalink / raw)
To: Bamvor Jian Zhang, linux-api-u79uwXL29TY76Z2rM5mHXA
Cc: khilman-QSEj5FYQhm4dnm+yROfE0A,
tyler.baker-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A, mpe-Gsx/Oe8HsFggBc27wqDAHg,
Shuah Khan
On 11/17/2015 07:35 AM, Bamvor Jian Zhang wrote:
> These patches try to enable two testcases (capabilities and ipc) and
> make them build successful in cross compiling environment.
>
> Clean up the Makefile of capabilities according to the usage in
> kselftest.
>
> Changes since v1
> 1. Update Makefile of capabilities according to Michael's suggestion.
> reference commit message for details.
>
> Bamvor Jian Zhang (3):
> selftests/capabilities: clean up for Makefile
> selftests/capabilities: actually test it
> selftest/ipc: actually test it
>
> tools/testing/selftests/Makefile | 2 ++
> tools/testing/selftests/capabilities/Makefile | 21 +++++++++------------
> 2 files changed, 11 insertions(+), 12 deletions(-)
>
Thanks. These 3 patches are now in linux-kselftest next
for 4.5-rc1
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-23 20:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 14:35 [PATCH V2 0/3] Clean up and enable two testcases in kselftest Bamvor Jian Zhang
[not found] ` <1447770943-10059-1-git-send-email-bamvor.zhangjian-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-11-17 14:35 ` [PATCH V2 1/3] selftests/capabilities: clean up for Makefile Bamvor Jian Zhang
2015-11-17 14:35 ` [PATCH V2 2/3] selftests/capabilities: actually test it Bamvor Jian Zhang
2015-11-17 14:35 ` [PATCH V2 3/3] selftest/ipc: " Bamvor Jian Zhang
2015-11-23 20:33 ` [PATCH V2 0/3] Clean up and enable two testcases in kselftest Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).