[igt-dev] [PATCH i-g-t] tests/kms_flip: Don't use igt_fixture in an exit handler

Chris Wilson chris at chris-wilson.co.uk
Tue May 19 11:10:55 UTC 2020


Quoting Petri Latvala (2020-05-19 10:48:21)
> kms_flip's exit handler was wrapped in an igt_fixture some 7 years ago
> because "it can fail". That's not a problem anymore, as igt_fail()
> will explicitly handle failing in an exit handler.
> 
> Rather, using igt_fixture in an exit handler is harmful because on a
> subtest failure, we don't always keep track of the currently running
> context (whether we're inside a subtest anymore) and we forcefully
> assert correct nesting of IGT magic control blocks now.
> 
> We already know the state is cleanable because we only install the
> handler on a successful init. Unconditional cleanup in an exit handler
> is the correct thing to do in general.
> 
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list