]> git.baikalelectronics.ru Git - kernel.git/commit
perf tests: Add numeric identifier to evlist_test
authorAlexander Yarygin <yarygin@linux.vnet.ibm.com>
Fri, 25 Apr 2014 15:34:06 +0000 (17:34 +0200)
committerJiri Olsa <jolsa@kernel.org>
Tue, 29 Apr 2014 12:29:48 +0000 (14:29 +0200)
commit38730850f5c5677d31eaee090fa5b2f5e0d43f1a
tree34656ff243c7dcbefdc2e529235d77edd3aaf9b7
parentec5739fa75ca905de64efe358e7ff65170677de6
perf tests: Add numeric identifier to evlist_test

In tests/parse-events.c test cases are declared in evlist_test[]
arrays. Elements of arrays are initialized in following pattern:
[i] = {
  .name  = ...,
  .check = ...,
  },

When perf-test is running with '-v' option, 'i' variable will be
printed for every existing test.

However, we can't add any arch specific tests inside #ifdefs, because it
will create collision between the element number inside #ifdef and the
next one outside.

This patch adds 'id' field in evlist_test, uses it as a test
identifier and removes explicit numbering of array elements. This helps
to number tests with gaps.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1398440047-6641-3-git-send-email-yarygin@linux.vnet.ibm.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
tools/perf/tests/parse-events.c