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

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Chris Wilson <ch...@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to