]> git.baikalelectronics.ru Git - kernel.git/commit
perf test: Fix dso cache testcase
authorNamhyung Kim <namhyung@kernel.org>
Fri, 30 Jan 2015 02:33:27 +0000 (11:33 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 6 Feb 2015 10:46:35 +0000 (11:46 +0100)
commit950e1b03f83f8246eba0f96bcd936d3a02716530
tree31cde2a8c56eac05aaf0fcbdf72c9ca3efb0eaa2
parent0ecb7b2c3357938797ce453cb6cee6aaf9c9f966
perf test: Fix dso cache testcase

The current dso cache permits to keep dso->data.fd is open under a half
of open file limit.  But test__dso_data_cache() sets dso_cnt to limit /
2 + 1 so it'll reach the limit in the loop even though the loop count is
one less than the dso_cnt and it makes the final dso__data_fd() after
the loop meaningless.

I guess the intention was dsos[0]->data.fd is open before the last open
and gets closed after it.  So add an assert before the last open.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1422585209-32742-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/dso-data.c