diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2017-11-22 20:49:58 +0000 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2017-11-23 08:28:28 +0000 |
commit | 8cf978bb55c312fb585364451c5aaf9f4ef9781a (patch) | |
tree | 55a94ac5790a65518d38ec0fb13f3c5c8cc5e1be /tests/perf_pmu.c | |
parent | 6ea85cc7dcff94cf2067d92b452672cf8109fa29 (diff) |
tests/perf_pmu: Make the invalid-init failure place more obvious
Put the values into the assert so we know which step failed.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/perf_pmu.c')
-rw-r--r-- | tests/perf_pmu.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index ef5de658..bf862b2f 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -661,7 +661,6 @@ multi_client(int gem_fd, const struct intel_execution_engine2 *e) static void invalid_init(void) { struct perf_event_attr attr; - int pid, cpu; #define ATTR_INIT() \ do { \ @@ -674,21 +673,15 @@ do { \ ATTR_INIT(); attr.sample_period = 100; - pid = -1; - cpu = 0; - igt_assert_eq(perf_event_open(&attr, pid, cpu, -1, 0), -1); + igt_assert_eq(perf_event_open(&attr, -1, 0, -1, 0), -1); igt_assert_eq(errno, EINVAL); ATTR_INIT(); - pid = 0; - cpu = 0; - igt_assert_eq(perf_event_open(&attr, pid, cpu, -1, 0), -1); + igt_assert_eq(perf_event_open(&attr, 0, 0, -1, 0), -1); igt_assert_eq(errno, EINVAL); ATTR_INIT(); - pid = -1; - cpu = 1; - igt_assert_eq(perf_event_open(&attr, pid, cpu, -1, 0), -1); + igt_assert_eq(perf_event_open(&attr, -1, 1, -1, 0), -1); igt_assert_eq(errno, ENODEV); } |