[igt-dev] [PATCH i-g-t] i915/api_intel_allocator: fix standalone subtest

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Feb 14 14:16:57 UTC 2022


Subtest standalone uses igt_fork macro and after that makes
checks of work done by children processes, but this macro start
counting from zero, it never touches index 2. Fix it with
corrected index.
  This wasn't observed in CI due to HIGH_TO_LOW strategy used as
default in allocator so first obtained offset was never zero.

Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 tests/i915/api_intel_allocator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c
index 6d7764ca..5edba27f 100644
--- a/tests/i915/api_intel_allocator.c
+++ b/tests/i915/api_intel_allocator.c
@@ -327,7 +327,7 @@ static void standalone(int fd)
 	}
 	igt_waitchildren();
 	igt_assert_eq(offset, shared[1]);
-	igt_assert_neq(offset, shared[2]);
+	igt_assert_neq(offset, shared[0]);
 
 	intel_allocator_free(ahnd, handle);
 	igt_assert_eq(intel_allocator_close(ahnd), true);
-- 
2.32.0



More information about the igt-dev mailing list