libperf tests: Update a use of the new cpumap API
authorIan Rogers <irogers@google.com>
Fri, 14 Jan 2022 06:51:05 +0000 (22:51 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 14 Jan 2022 14:36:03 +0000 (11:36 -0300)
Fixes a build breakage.

Fixes: 6d18804b963b78dc ("perf cpumap: Give CPUs their own type")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: colin ian king <colin.king@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Link: http://lore.kernel.org/lkml/20220114065105.1806542-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/tests/test-evlist.c

index e7afff12c35a9f1453b4788a3c24eef0005e3198..b3479dfa9a1cf006573997d07c40264395f631b2 100644 (file)
@@ -334,7 +334,8 @@ static int test_mmap_cpus(void)
        };
        cpu_set_t saved_mask;
        char path[PATH_MAX];
-       int id, err, cpu, tmp;
+       int id, err, tmp;
+       struct perf_cpu cpu;
        union perf_event *event;
        int count = 0;
 
@@ -377,7 +378,7 @@ static int test_mmap_cpus(void)
                cpu_set_t mask;
 
                CPU_ZERO(&mask);
-               CPU_SET(cpu, &mask);
+               CPU_SET(cpu.cpu, &mask);
 
                err = sched_setaffinity(0, sizeof(mask), &mask);
                __T("sched_setaffinity failed", err == 0);