perf tests: Adding build test for having ending double slash
authorJiri Olsa <jolsa@redhat.com>
Mon, 27 Jul 2015 18:24:17 +0000 (20:24 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Jul 2015 15:23:08 +0000 (12:23 -0300)
commitaa53c09e90a19c215549bd1ca970fddcb7c0c001
tree37d8cba81f6dbf46440e0eaecd7a1d3f4cbbb502
parentc421e80b1073e2ed58842ee6ee493386ace2d9eb
perf tests: Adding build test for having ending double slash

Pawel Moll reported build issue for having extra slash (/) at the end of
the prefix variable.

  $ make prefix=/usr/local/

    CC       tests/attr.o
  tests/attr.c: In function ‘test__attr’:
  tests/attr.c:168:50: error: expected ‘)’ before ‘;’ token
    snprintf(path_perf, PATH_MAX, "%s/perf", BINDIR);
                                                ^
  tests/attr.c:176:1: error: expected ‘;’ before ‘}’ token
   }
   ^
  tests/attr.c:176:1: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
  cc1: all warnings being treated as errors

Adding automated test case for this.

Reported-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20150727182417.GD20509@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/make