[Intel-gfx] [PATCH igt 1/2] igt/perf_pmu: Clear errno in between invalid atrr tests

Chris Wilson chris at chris-wilson.co.uk
Wed Nov 22 19:00:47 UTC 2017


Reset the errno after testing each invalid attr so that it is carried
over on a false positive.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/perf_pmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index e2d2caba..bcb90c84 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -689,6 +689,7 @@ do { \
 	attr.config = I915_PMU_ENGINE_BUSY(I915_ENGINE_CLASS_RENDER, 0); \
 	attr.type = i915_type_id(); \
 	igt_assert(attr.type != 0); \
+	errno = 0; \
 } while(0)
 
 	ATTR_INIT();
-- 
2.15.0



More information about the Intel-gfx mailing list