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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170605103317.GA28871@krava>
Date:   Mon, 5 Jun 2017 12:33:17 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     peterz@...radead.org, acme@...nel.org, eranian@...gle.com,
        jolsa@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 6/6] perf, tools: Add test cases for new data source
 encoding

On Fri, Jun 02, 2017 at 01:12:33PM -0700, Andi Kleen wrote:

SNIP

> +	n += perf_mem__lvl_scnprintf(out + n, sizeof out - n, &mi);
> +	snprintf(failure, sizeof failure, "unexpected %s", out);
> +	TEST_ASSERT_VAL(failure, !strcmp(string, out));
> +	return 0;
> +}
> +
> +int test__mem(int subtest __maybe_unused)
> +{
> +	int ret = 0;
> +
> +	ret |= check(((union perf_mem_data_src) {
> +				.mem_lvl = PERF_MEM_LVL_HIT,
> +				.mem_lvlx = PERF_MEM_LVLX_L4 }), "N/AL4 hit");
> +
> +	ret |= check(((union perf_mem_data_src) {
> +				.mem_lvl = PERF_MEM_LVL_MISS,
> +				.mem_lvlx = PERF_MEM_LVLX_PMEM }), "N/APMEM miss");
> +
> +	ret |= check(((union perf_mem_data_src) {
> +				.mem_snoopx = PERF_MEM_SNOOPX_FWD,
> +				.mem_lvl = PERF_MEM_LVL_MISS,
> +				.mem_lvlx = PERF_MEM_LVLX_RAM }), "ForwardRAM miss");

[jolsa@...va perf]$ ./perf test source -v
 5: Test data source output                    :
--- start ---
test child forked, pid 8689
FAILED tests/mem.c:20 unexpected FwdRAM miss
test child finished with -1
---- end ----
Test data source output: FAILED!

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ