lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 10 Nov 2021 16:21:02 -0800 From: Ian Rogers <irogers@...gle.com> To: Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>, John Garry <john.garry@...wei.com>, Kajol Jain <kjain@...ux.ibm.com>, "Paul A . Clarke" <pc@...ibm.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Riccardo Mancini <rickyman7@...il.com>, Kan Liang <kan.liang@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Mark Rutland <mark.rutland@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Madhavan Srinivasan <maddy@...ux.ibm.com>, Song Liu <song@...nel.org>, Wan Jiabing <wanjiabing@...o.com>, Yury Norov <yury.norov@...il.com>, linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org Cc: Ian Rogers <irogers@...gle.com> Subject: [PATCH v2 1/8] perf test: Add expr test for events with hyphens An example of such an event is topdown-fe-bound. Signed-off-by: Ian Rogers <irogers@...gle.com> --- tools/perf/tests/expr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index 077783223ce0..9ee2dc91c27b 100644 --- a/tools/perf/tests/expr.c +++ b/tools/perf/tests/expr.c @@ -134,6 +134,16 @@ int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused) TEST_ASSERT_VAL("find ids", hashmap__find(ctx->ids, "EVENT2,param=3@", (void **)&val_ptr)); + expr__ctx_clear(ctx); + TEST_ASSERT_VAL("find ids", + expr__find_ids("dash\\-event1 - dash\\-event2", + NULL, ctx) == 0); + TEST_ASSERT_VAL("find ids", hashmap__size(ctx->ids) == 2); + TEST_ASSERT_VAL("find ids", hashmap__find(ctx->ids, "dash-event1", + (void **)&val_ptr)); + TEST_ASSERT_VAL("find ids", hashmap__find(ctx->ids, "dash-event2", + (void **)&val_ptr)); + /* Only EVENT1 or EVENT2 need be measured depending on the value of smt_on. */ expr__ctx_clear(ctx); TEST_ASSERT_VAL("find ids", -- 2.34.0.rc1.387.gb447b232ab-goog
Powered by blists - more mailing lists