Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752529AbdHNU3J (ORCPT ); Mon, 14 Aug 2017 16:29:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53682 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbdHNU3I (ORCPT ); Mon, 14 Aug 2017 16:29:08 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6A7AF272BE Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=acme@redhat.com Date: Mon, 14 Aug 2017 17:28:54 -0300 From: Arnaldo Carvalho de Melo To: Michael Petlan Cc: tmricht@linux.vnet.ibm.com, namhyung@kernel.org, dsahern@gmail.com, Jiri Olsa , tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, adrian.hunter@intel.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org, acme@kernel.org Subject: Re: [tip:perf/core] perf test shell: Install shell tests Message-ID: <20170814202854.GC2641@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 14 Aug 2017 20:29:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5436 Lines: 114 Em Mon, Aug 14, 2017 at 08:44:14PM +0200, Michael Petlan escreveu: > Hi Arnaldo! > > Maybe this would be the right time to incorporate the shell-based > perftool-testsuite [1] into perf-test, wouldn't it? Perhaps its time, yes. Some questions: Do these tests assume that perf was built in some particular way, i.e. as it is packaged for RHEL? One thing that came to mind from a report from Kim Phillips, that I addressed (to some extent) after this sending this first patchkit to Ingo was that perf can be built in many ways, for instance, without 'perf probe', or with 'perf probe' but without DWARF support, which will allow some features to be tested while others should cause the test needing not-builtin features to just return '2', that will make it be marked as "Skip" in the output. - Arnaldo > It already contains bunch of shell-based perf tests that cover > 25+ RH bugs... > > A little problem might be different design, since the testsuite > has multiple levels of hierarchy of sub-sub-sub-tests, like: > > ... > -- [ PASS ] -- perf_probe :: test_probe_syntax :: custom named probe :: add > -- [ PASS ] -- perf_probe :: test_probe_syntax :: custom named probe :: list > -- [ PASS ] -- perf_probe :: test_probe_syntax :: custom named probe :: use > -- [ PASS ] -- perf_probe :: test_probe_syntax :: various syntax forms :: vfs_read@fs/read_write.c > -- [ PASS ] -- perf_probe :: test_probe_syntax :: various syntax forms :: vfs_read:11@fs/read_write.c > -- [ PASS ] -- perf_probe :: test_probe_syntax :: various syntax forms :: vfs_read@fs/read_write.c:11 > -- [ PASS ] -- perf_probe :: test_probe_syntax :: various syntax forms :: vfs_read%return > -- [ PASS ] -- perf_probe :: test_probe_syntax :: various syntax forms :: test.c:29 > -- [ PASS ] -- perf_probe :: test_probe_syntax :: various syntax forms :: func%return $retval > ## [ PASS ] ## perf_probe :: test_probe_syntax SUMMARY > -- [ PASS ] -- perf_probe :: test_sdt :: adding SDT tracepoints as probes > -- [ PASS ] -- perf_probe :: test_sdt :: listing added probes > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf stat (N = 13) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf stat (N = 128) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf stat (N = 241) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf record (N = 37) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf report (N = 37) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf script (N = 37) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf record (N = 97) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf report (N = 97) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf script (N = 97) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf record (N = 237) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf report (N = 237) > -- [ PASS ] -- perf_probe :: test_sdt :: using probes :: perf script (N = 237) > ## [ PASS ] ## perf_probe :: test_sdt SUMMARY > ... > > ... which does not exactly match how perf-test is structured, however, > I think that the multi-level structure of the testsuite is important > for keeping some order in it... > > What do you think? > > Cheers, > Michael > > > > [1] https://github.com/rfmvh/perftool-testsuite > > > On Mon, 14 Aug 2017, tip-bot for Arnaldo Carvalho de Melo wrote: > > > Commit-ID: 122e0b947052f6106595fa29d63d514d2ebcdad9 > > Gitweb: http://git.kernel.org/tip/122e0b947052f6106595fa29d63d514d2ebcdad9 > > Author: Arnaldo Carvalho de Melo > > AuthorDate: Fri, 4 Aug 2017 12:19:44 -0300 > > Committer: Arnaldo Carvalho de Melo > > CommitDate: Fri, 11 Aug 2017 16:06:28 -0300 > > > > perf test shell: Install shell tests > > > > Now that we have shell tests, install them. > > > > Developers don't need this pass, as 'perf test' will look first at the > > in tree scripts at tools/perf/tests/shell/. > > > > Cc: Adrian Hunter > > Cc: David Ahern > > Cc: Jiri Olsa > > Cc: Michael Petlan > > Cc: Namhyung Kim > > Cc: Thomas Richter > > Cc: Wang Nan > > Link: http://lkml.kernel.org/n/tip-j21u4v0jsehi0lpwqwjb4j45@git.kernel.org > > Signed-off-by: Arnaldo Carvalho de Melo > > --- > > tools/perf/Makefile.perf | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > > index c1f7884..eb13567 100644 > > --- a/tools/perf/Makefile.perf > > +++ b/tools/perf/Makefile.perf > > @@ -760,7 +760,9 @@ install-tests: all install-gtk > > $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ > > $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ > > $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ > > - $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' > > + $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ > > + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ > > + $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell' > > > > install-bin: install-tools install-tests install-traceevent-plugins > > > >