perf tools: Allow to reset open files counter
authorJiri Olsa <jolsa@kernel.org>
Tue, 28 Jun 2016 11:29:02 +0000 (13:29 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Jun 2016 21:27:44 +0000 (18:27 -0300)
commitf3069249e9e6b0ce303c3547dfa2960ee2e95b61
treebfbcc640021817450bdf555d13e27bf1bbf72ce0
parent3be28870c05ad09dfff4dbefe71b02aba5dba569
perf tools: Allow to reset open files counter

I hit a bug when running test suite without forking
each test (-F option):

  $ perf test -F dso
   8: Test dso data read                                       : Ok
   9: Test dso data cache                                      : FAILED!
  10: Test dso data reopen                                     : FAILED!

The reason the session file limit is set just once for
perf process so we need to reset it for each test,
otherwise wrong limit is taken into account.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Nilay Vaish <nilayvaish@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1467113345-12669-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/dso-data.c
tools/perf/util/dso.c
tools/perf/util/dso.h