lkml.org 
[lkml]   [2017]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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@krava 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

    \
     
     \ /
      Last update: 2017-06-12 00:19    [W:3.202 / U:1.300 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site