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 linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1405123165-22666-11-git-send-email-andi@firstfloor.org> Date: Fri, 11 Jul 2014 16:59:24 -0700 From: Andi Kleen <andi@...stfloor.org> To: jolsa@...hat.com Cc: linux-kernel@...r.kernel.org, namhyung@...nel.org, acme@...radead.org, Andi Kleen <ak@...ux.intel.com> Subject: [PATCH 10/11] perf, tools, test: Add test case for alias and JSON parsing From: Andi Kleen <ak@...ux.intel.com> Add a simple test case to perf test that runs perf download and parses all the available events, including json events. This needs adding an all event iterator to pmu.c v2: Rename identifiers v3: Only iterate cpu pmu to avoid bogus errors. Move pmu iterator to extra patch Acked-by: Namhyung Kim <namhyung@...nel.org> Signed-off-by: Andi Kleen <ak@...ux.intel.com> --- tools/perf/Makefile.perf | 1 + tools/perf/tests/builtin-test.c | 4 ++++ tools/perf/tests/tests.h | 1 + 3 files changed, 6 insertions(+) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 0600425..6adb37f 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -419,6 +419,7 @@ endif LIB_OBJS += $(OUTPUT)tests/code-reading.o LIB_OBJS += $(OUTPUT)tests/sample-parsing.o LIB_OBJS += $(OUTPUT)tests/parse-no-sample-id-all.o +LIB_OBJS += $(OUTPUT)tests/aliases.o ifndef NO_DWARF_UNWIND ifeq ($(ARCH),$(filter $(ARCH),x86 arm)) LIB_OBJS += $(OUTPUT)tests/dwarf-unwind.o diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 6f8b01b..bb37ac2 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -154,6 +154,10 @@ static struct test { .func = test__hists_cumulate, }, { + .desc = "Test parsing JSON aliases", + .func = test__aliases, + }, + { .func = NULL, }, }; diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index ed64790..ab92ad9 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -48,6 +48,7 @@ int test__mmap_thread_lookup(void); int test__thread_mg_share(void); int test__hists_output(void); int test__hists_cumulate(void); +int test__aliases(void); #if defined(__x86_64__) || defined(__i386__) || defined(__arm__) #ifdef HAVE_DWARF_UNWIND_SUPPORT -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists