[igt-dev] [PATCH i-g-t] i915/api_intel_allocator: fix standalone subtest
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Feb 15 08:17:14 UTC 2022
On Mon, Feb 14, 2022 at 03:16:57PM +0100, Kamil Konieczny wrote:
> 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
>
You're right - test is working on wrong indices. But before we will
merge please change also comment as well as standalone (child 0)
should be first (currently 0 is shared and 1 standalone). My initial
idea was to detach in first child and share allocator in second one.
Then change asserts accordingly.
--
Zbigniew
More information about the igt-dev
mailing list