Skip to contentSkip to conversation

tests/perf_pmu: Make the invalid-init failure place more obvious

PATCH In review Tvrtko Ursulin 3 participants 3 messages Nov 22, 2017 – Nov 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/perf_pmu: Make the invalid-init failure place more obvious

From: Tvrtko Ursulin <[email protected]>

Put the values into the assert so we know which step failed.

---
 tests/perf_pmu.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
tests/perf_pmu.c +3 -10
index 17f0afca6fe1..14eeee43c55c 100644
@@ -736,7 +736,6 @@ queued(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 { \
@@ -748,21 +747,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);
 }
 
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✗ Fi.CI.BAT: failure for tests/perf_pmu: Make the invalid-init failure place more obvious

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: tests/perf_pmu: Make the invalid-init failure place more obvious
URL : https://patchwork.freedesktop.org/series/34255/
State : failure

== Summary ==

Series 34255 revision 1 was fully merged or fully failed: no git log

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx