perf tests: Factor check_parse_id function
authorJiri Olsa <jolsa@kernel.org>
Tue, 2 Jun 2020 21:47:31 +0000 (23:47 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 22 Jun 2020 19:28:08 +0000 (16:28 -0300)
commit34bacc9578de2893ab6301cea89ea001d8e4cf5b
treed2f99ab49f30e9a703fc3c99f0b31bccf5370745
parent387ad33fe710758a8e1b860819a7452bceb4329a
perf tests: Factor check_parse_id function

Separating the generic part of check_parse_id function,
so it can be used in following changes for the new test.

Committer notes:

Fix this error:

  tests/pmu-events.c:413:40: error: missing field 'idx' initializer [-Werror,-Wmissing-field-initializers]
        struct parse_events_error error = { 0 };

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200602214741.1218986-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/pmu-events.c