lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121102103057.GB1157@krava.brq.redhat.com>
Date:	Fri, 2 Nov 2012 11:30:57 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 02/25] perf tests: Move test objects into 'tests'
 directory

On Fri, Nov 02, 2012 at 10:48:57AM +0900, Namhyung Kim wrote:
> Hi Jiri,
> 
> Despite its way to acme's tree, I'd like to leave a few comments. :)
> 
> 
> On Tue, 30 Oct 2012 23:01:43 +0100, Jiri Olsa wrote:
> > Separating test objects into 'tests' directory.
> >
> > Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> > Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
> > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Cc: Ingo Molnar <mingo@...e.hu>
> > Cc: Paul Mackerras <paulus@...ba.org>
> > Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
> > Cc: Frederic Weisbecker <fweisbec@...il.com>
> > ---
> >  tools/perf/Makefile                 |    9 +-
> >  tools/perf/builtin-test.c           | 1559 -----------------------------------
> >  tools/perf/tests/builtin-test.c     | 1559 +++++++++++++++++++++++++++++++++++
> >  tools/perf/tests/dso-data.c         |  153 ++++
> >  tools/perf/tests/parse-events.c     | 1116 +++++++++++++++++++++++++
> >  tools/perf/util/dso-test-data.c     |  153 ----
> >  tools/perf/util/parse-events-test.c | 1116 -------------------------
> 
> Looks like it should be considered as renames.  Isn't 'git format-patch
> -M' working?

I can see it is.. nice ;) first time I hear about it..

> 
> 
> >  7 files changed, 2833 insertions(+), 2832 deletions(-)
> >  delete mode 100644 tools/perf/builtin-test.c
> >  create mode 100644 tools/perf/tests/builtin-test.c
> >  create mode 100644 tools/perf/tests/dso-data.c
> >  create mode 100644 tools/perf/tests/parse-events.c
> >  delete mode 100644 tools/perf/util/dso-test-data.c
> >  delete mode 100644 tools/perf/util/parse-events-test.c
> >
> > diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> > index 3e807d7..2d3427f 100644
> > --- a/tools/perf/Makefile
> > +++ b/tools/perf/Makefile
> > @@ -169,7 +169,7 @@ endif
> >  
> >  ### --- END CONFIGURATION SECTION ---
> >  
> > -BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)util -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> > +BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)util -Iutil -I. -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> 
> Hmm..  Do you really want this?  AFAIK there're lots of places that
> include header files under the util directory and they used relative
> path.  I don't know how it affects them but at least they can be changed
> to use simpler path with this change.

[jolsa@...va perf]$ make O=$PWD/../build/
...
    CC /home/jolsa/kernel.org/linux/tools/build/tests/parse-events.o
tests/parse-events.c:2:26: fatal error: parse-events.h: No such file or directory

yes, we could consolidate util includes globaly

> 
> 
> >  BASIC_LDFLAGS =
> >  
> >  ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
> > @@ -371,7 +371,6 @@ LIB_OBJS += $(OUTPUT)util/help.o
> >  LIB_OBJS += $(OUTPUT)util/levenshtein.o
> >  LIB_OBJS += $(OUTPUT)util/parse-options.o
> >  LIB_OBJS += $(OUTPUT)util/parse-events.o
> > -LIB_OBJS += $(OUTPUT)util/parse-events-test.o
> >  LIB_OBJS += $(OUTPUT)util/path.o
> >  LIB_OBJS += $(OUTPUT)util/rbtree.o
> >  LIB_OBJS += $(OUTPUT)util/bitmap.o
> > @@ -389,7 +388,6 @@ LIB_OBJS += $(OUTPUT)util/sigchain.o
> >  LIB_OBJS += $(OUTPUT)util/dso.o
> >  LIB_OBJS += $(OUTPUT)util/symbol.o
> >  LIB_OBJS += $(OUTPUT)util/symbol-elf.o
> > -LIB_OBJS += $(OUTPUT)util/dso-test-data.o
> >  LIB_OBJS += $(OUTPUT)util/color.o
> >  LIB_OBJS += $(OUTPUT)util/pager.o
> >  LIB_OBJS += $(OUTPUT)util/header.o
> > @@ -430,6 +428,9 @@ LIB_OBJS += $(OUTPUT)ui/stdio/hist.o
> >  
> >  LIB_OBJS += $(OUTPUT)arch/common.o
> >  
> > +LIB_OBJS += $(OUTPUT)tests/parse-events.o
> > +LIB_OBJS += $(OUTPUT)tests/dso-data.o
> > +
> 
> Maybe TEST_OBJS?  I guess they don't need to be included in libperf?

I guess we could have NO_TESTS Makefile variable to disable tests

and '[x] Tests' directory under make menuconfig ;)

> 
> 
> >  BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
> >  BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
> >  # Benchmark modules
> > @@ -459,8 +460,8 @@ BUILTIN_OBJS += $(OUTPUT)builtin-probe.o
> >  BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o
> >  BUILTIN_OBJS += $(OUTPUT)builtin-lock.o
> >  BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o
> > -BUILTIN_OBJS += $(OUTPUT)builtin-test.o
> >  BUILTIN_OBJS += $(OUTPUT)builtin-inject.o
> > +BUILTIN_OBJS += $(OUTPUT)tests/builtin-test.o
> 
> Placing builtin command in a different directory looks little bit odd.

well, it's full of tests ;)

maybe we could have those tests placed in separate files and use
builtin-test as runner only

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ