* [PATCH 0/3] perf tool: Build fixes
@ 2015-06-22 12:50 Jiri Olsa
2015-06-22 12:50 ` [PATCH 1/3] perf tests: Add testing for Makefile.perf Jiri Olsa
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jiri Olsa @ 2015-06-22 12:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: lkml, Adrian Hunter, Andi Kleen, David Ahern, Ingo Molnar,
Namhyung Kim, Peter Zijlstra, Stephane Eranian, Lukas Wunner
hi,
sending some build fixes.
Also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/make_test
thanks,
jirka
---
Jiri Olsa (3):
perf tests: Add testing for Makefile.perf
perf tests: Add test for make install with prefix
perf build: Fix single target build dependency check
tools/perf/Makefile | 4 ++--
tools/perf/tests/make | 31 ++++++++++++++++++++++++++++---
2 files changed, 30 insertions(+), 5 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] perf tests: Add testing for Makefile.perf
2015-06-22 12:50 [PATCH 0/3] perf tool: Build fixes Jiri Olsa
@ 2015-06-22 12:50 ` Jiri Olsa
2015-06-25 7:55 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-06-22 12:50 ` [PATCH 2/3] perf tests: Add test for make install with prefix Jiri Olsa
2015-06-22 12:50 ` [PATCH 3/3] perf build: Fix single target build dependency check Jiri Olsa
2 siblings, 1 reply; 7+ messages in thread
From: Jiri Olsa @ 2015-06-22 12:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: lkml, Adrian Hunter, Andi Kleen, David Ahern, Ingo Molnar,
Namhyung Kim, Peter Zijlstra, Stephane Eranian, Lukas Wunner
Currently we test only builds through top level Makefile,
but seems like there's a bunch of users using Makefile.perf
directly.
Changing the make suite to be run for Makefile.perf as well.
It takes now considerable amount of time, but hopefully we
catch more issues.
Also fixing the output indentation for make_kernelsrc and
make_kernelsrc_tools tests.
Link: http://lkml.kernel.org/n/tip-fr9fdnme6d71pmj5xowb8coh@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/tests/make | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 65280d28662e..bfe1962da0df 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -1,5 +1,16 @@
+ifndef MK
+ifeq ($(MAKECMDGOALS),)
+# no target specified, trigger the whole suite
+all:
+ @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile
+ @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf
+else
+# run only specific test over 'Makefile'
+%:
+ @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@
+endif
+else
PERF := .
-MK := Makefile
include config/Makefile.arch
@@ -57,7 +68,12 @@ make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1
# $(run) contains all available tests
run := make_pure
+# Targets 'clean all' can be run together only through top level
+# Makefile because we detect clean target in Makefile.perf and
+# disable features detection
+ifeq ($(MK),Makefile)
run += make_clean_all
+endif
run += make_python_perf_so
run += make_debug
run += make_no_libperl
@@ -226,13 +242,13 @@ tarpkg:
( eval $$cmd ) >> $@ 2>&1
make_kernelsrc:
- @echo " - make -C <kernelsrc> tools/perf"
+ @echo "- make -C <kernelsrc> tools/perf"
$(call clean); \
(make -C ../.. tools/perf) > $@ 2>&1 && \
test -x perf && rm -f $@ || (cat $@ ; false)
make_kernelsrc_tools:
- @echo " - make -C <kernelsrc>/tools perf"
+ @echo "- make -C <kernelsrc>/tools perf"
$(call clean); \
(make -C ../../tools perf) > $@ 2>&1 && \
test -x perf && rm -f $@ || (cat $@ ; false)
@@ -244,3 +260,4 @@ out: $(run_O)
@echo OK
.PHONY: all $(run) $(run_O) tarpkg clean
+endif # ifndef MK
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] perf tests: Add test for make install with prefix
2015-06-22 12:50 [PATCH 0/3] perf tool: Build fixes Jiri Olsa
2015-06-22 12:50 ` [PATCH 1/3] perf tests: Add testing for Makefile.perf Jiri Olsa
@ 2015-06-22 12:50 ` Jiri Olsa
2015-06-25 7:55 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-06-22 12:50 ` [PATCH 3/3] perf build: Fix single target build dependency check Jiri Olsa
2 siblings, 1 reply; 7+ messages in thread
From: Jiri Olsa @ 2015-06-22 12:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: lkml, Adrian Hunter, Andi Kleen, David Ahern, Ingo Molnar,
Namhyung Kim, Peter Zijlstra, Stephane Eranian, Lukas Wunner
Lukas Wunner reported issue (and fix) with 'make install prefix=...'.
Adding automated test for this, so it wouldn't happen again.
Link: http://lkml.kernel.org/n/tip-qfcf64pquysrw6533ku9ixea@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/tests/make | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index bfe1962da0df..729112f4cfaa 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -58,6 +58,7 @@ make_install_man := install-man
make_install_html := install-html
make_install_info := install-info
make_install_pdf := install-pdf
+make_install_prefix := install prefix=/tmp/krava
make_static := LDFLAGS=-static
# all the NO_* variable combined
@@ -99,6 +100,7 @@ run += make_util_map_o
run += make_util_pmu_bison_o
run += make_install
run += make_install_bin
+run += make_install_prefix
# FIXME 'install-*' commented out till they're fixed
# run += make_install_doc
# run += make_install_man
@@ -173,6 +175,12 @@ test_make_install_O := $(call test_dest_files,$(installed_files_all))
test_make_install_bin := $(call test_dest_files,$(installed_files_bin))
test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin))
+# We prefix all installed files for make_install_prefix
+# with '/tmp/krava' to match installed/prefix-ed files.
+installed_files_all_prefix := $(addprefix /tmp/krava/,$(installed_files_all))
+test_make_install_prefix := $(call test_dest_files,$(installed_files_all_prefix))
+test_make_install_prefix_O := $(call test_dest_files,$(installed_files_all_prefix))
+
# FIXME nothing gets installed
test_make_install_man := test -f $$TMP_DEST/share/man/man1/perf.1
test_make_install_man_O := $(test_make_install_man)
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] perf build: Fix single target build dependency check
2015-06-22 12:50 [PATCH 0/3] perf tool: Build fixes Jiri Olsa
2015-06-22 12:50 ` [PATCH 1/3] perf tests: Add testing for Makefile.perf Jiri Olsa
2015-06-22 12:50 ` [PATCH 2/3] perf tests: Add test for make install with prefix Jiri Olsa
@ 2015-06-22 12:50 ` Jiri Olsa
2015-06-25 7:56 ` [tip:perf/core] " tip-bot for Jiri Olsa
2 siblings, 1 reply; 7+ messages in thread
From: Jiri Olsa @ 2015-06-22 12:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: lkml, Adrian Hunter, Andi Kleen, David Ahern, Ingo Molnar,
Namhyung Kim, Peter Zijlstra, Stephane Eranian, Lukas Wunner
Currently if we build single target like:
$ touch util/map.c && make util/map.o
It will not rebuild util/map.o if it already exists
and util/map.c is modified.
The reason is that the top-level 'Makefile' processes
util/map.o as an implicit rule and if util/map.o exists
make considers the 'util/map.o' target as done and wouldn't
nest into Makefile.perf.
Adding FORCE for '%', because that's what we want to nest
into Makefile.perf for any target.
Adding Makefile into phony targets, because make tries to
rebuilt it and it's also resolved as '%' target.
Link: http://lkml.kernel.org/n/tip-yrix4k0nb2fgmtzvmvxr23ps@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d31a7bbd7cee..480546d5f13b 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -83,8 +83,8 @@ build-test:
#
# All other targets get passed through:
#
-%:
+%: FORCE
$(print_msg)
$(make)
-.PHONY: tags TAGS
+.PHONY: tags TAGS FORCE Makefile
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:perf/core] perf tests: Add testing for Makefile.perf
2015-06-22 12:50 ` [PATCH 1/3] perf tests: Add testing for Makefile.perf Jiri Olsa
@ 2015-06-25 7:55 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-06-25 7:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: a.p.zijlstra, lukas, acme, eranian, mingo, ak, jolsa,
adrian.hunter, hpa, tglx, namhyung, linux-kernel, dsahern
Commit-ID: 502819c5f35ef44eb7151fb85cd883c5b76b506d
Gitweb: http://git.kernel.org/tip/502819c5f35ef44eb7151fb85cd883c5b76b506d
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 22 Jun 2015 14:50:50 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 22 Jun 2015 11:21:57 -0300
perf tests: Add testing for Makefile.perf
Currently we test only builds through top level Makefile, but seems like
there's a bunch of users using Makefile.perf directly.
Changing the make suite to be run for Makefile.perf as well. It takes
now considerable amount of time, but hopefully we catch more issues.
Also fixing the output indentation for make_kernelsrc and
make_kernelsrc_tools tests.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1434977452-32520-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/make | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 65280d2..bfe1962da 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -1,5 +1,16 @@
+ifndef MK
+ifeq ($(MAKECMDGOALS),)
+# no target specified, trigger the whole suite
+all:
+ @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile
+ @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf
+else
+# run only specific test over 'Makefile'
+%:
+ @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@
+endif
+else
PERF := .
-MK := Makefile
include config/Makefile.arch
@@ -57,7 +68,12 @@ make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1
# $(run) contains all available tests
run := make_pure
+# Targets 'clean all' can be run together only through top level
+# Makefile because we detect clean target in Makefile.perf and
+# disable features detection
+ifeq ($(MK),Makefile)
run += make_clean_all
+endif
run += make_python_perf_so
run += make_debug
run += make_no_libperl
@@ -226,13 +242,13 @@ tarpkg:
( eval $$cmd ) >> $@ 2>&1
make_kernelsrc:
- @echo " - make -C <kernelsrc> tools/perf"
+ @echo "- make -C <kernelsrc> tools/perf"
$(call clean); \
(make -C ../.. tools/perf) > $@ 2>&1 && \
test -x perf && rm -f $@ || (cat $@ ; false)
make_kernelsrc_tools:
- @echo " - make -C <kernelsrc>/tools perf"
+ @echo "- make -C <kernelsrc>/tools perf"
$(call clean); \
(make -C ../../tools perf) > $@ 2>&1 && \
test -x perf && rm -f $@ || (cat $@ ; false)
@@ -244,3 +260,4 @@ out: $(run_O)
@echo OK
.PHONY: all $(run) $(run_O) tarpkg clean
+endif # ifndef MK
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:perf/core] perf tests: Add test for make install with prefix
2015-06-22 12:50 ` [PATCH 2/3] perf tests: Add test for make install with prefix Jiri Olsa
@ 2015-06-25 7:55 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-06-25 7:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: eranian, a.p.zijlstra, hpa, namhyung, linux-kernel, mingo,
dsahern, lukas, adrian.hunter, acme, tglx, ak, jolsa
Commit-ID: eb30d2c5077b30f9f8e00eb2e5fadba18b148538
Gitweb: http://git.kernel.org/tip/eb30d2c5077b30f9f8e00eb2e5fadba18b148538
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 22 Jun 2015 14:50:51 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 22 Jun 2015 11:24:05 -0300
perf tests: Add test for make install with prefix
Lukas Wunner reported issue (and fix[1]) with 'make install prefix=...'.
Adding automated test for this, so it wouldn't happen again.
[1]: 75e84ab906ef ("perf tools: Fix build breakage if prefix= is specified")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1434977452-32520-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/make | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index bfe1962da..729112f 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -58,6 +58,7 @@ make_install_man := install-man
make_install_html := install-html
make_install_info := install-info
make_install_pdf := install-pdf
+make_install_prefix := install prefix=/tmp/krava
make_static := LDFLAGS=-static
# all the NO_* variable combined
@@ -99,6 +100,7 @@ run += make_util_map_o
run += make_util_pmu_bison_o
run += make_install
run += make_install_bin
+run += make_install_prefix
# FIXME 'install-*' commented out till they're fixed
# run += make_install_doc
# run += make_install_man
@@ -173,6 +175,12 @@ test_make_install_O := $(call test_dest_files,$(installed_files_all))
test_make_install_bin := $(call test_dest_files,$(installed_files_bin))
test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin))
+# We prefix all installed files for make_install_prefix
+# with '/tmp/krava' to match installed/prefix-ed files.
+installed_files_all_prefix := $(addprefix /tmp/krava/,$(installed_files_all))
+test_make_install_prefix := $(call test_dest_files,$(installed_files_all_prefix))
+test_make_install_prefix_O := $(call test_dest_files,$(installed_files_all_prefix))
+
# FIXME nothing gets installed
test_make_install_man := test -f $$TMP_DEST/share/man/man1/perf.1
test_make_install_man_O := $(test_make_install_man)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:perf/core] perf build: Fix single target build dependency check
2015-06-22 12:50 ` [PATCH 3/3] perf build: Fix single target build dependency check Jiri Olsa
@ 2015-06-25 7:56 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-06-25 7:56 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, lukas, ak, hpa, tglx, linux-kernel, namhyung, mingo,
dsahern, eranian, a.p.zijlstra, adrian.hunter, jolsa
Commit-ID: 8e55735150934f9ab2ce8a8005626e5693a6b61d
Gitweb: http://git.kernel.org/tip/8e55735150934f9ab2ce8a8005626e5693a6b61d
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 22 Jun 2015 14:50:52 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 22 Jun 2015 11:27:09 -0300
perf build: Fix single target build dependency check
Currently if we build a single target like:
$ touch util/map.c && make util/map.o
It will not rebuild util/map.o if it already exists and util/map.c is
modified.
The reason is that the top-level 'Makefile' processes util/map.o as an
implicit rule and if util/map.o exists make considers the 'util/map.o'
target as done and will not nest into Makefile.perf.
Adding FORCE for '%', because that's what we want to nest into
Makefile.perf for any target.
Adding Makefile into phony targets, because make tries to rebuild it and
it's also resolved as '%' target.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1434977452-32520-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d31a7bb..480546d 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -83,8 +83,8 @@ build-test:
#
# All other targets get passed through:
#
-%:
+%: FORCE
$(print_msg)
$(make)
-.PHONY: tags TAGS
+.PHONY: tags TAGS FORCE Makefile
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-25 7:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 12:50 [PATCH 0/3] perf tool: Build fixes Jiri Olsa
2015-06-22 12:50 ` [PATCH 1/3] perf tests: Add testing for Makefile.perf Jiri Olsa
2015-06-25 7:55 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-06-22 12:50 ` [PATCH 2/3] perf tests: Add test for make install with prefix Jiri Olsa
2015-06-25 7:55 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-06-22 12:50 ` [PATCH 3/3] perf build: Fix single target build dependency check Jiri Olsa
2015-06-25 7:56 ` [tip:perf/core] " tip-bot for Jiri Olsa
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).