diff options
| author | Petri Latvala <petri.latvala@intel.com> | 2020-05-19 12:48:21 +0300 |
|---|---|---|
| committer | Petri Latvala <petri.latvala@intel.com> | 2020-05-25 11:45:40 +0300 |
| commit | 281b12e0a0172ff1cb22fdd9af222821a78f9769 (patch) | |
| tree | 7abf4983bf89bd095b363b5be7d49110f00c48d2 /tests | |
| parent | ff03d458f708583c8f9296f97c38df312055651a (diff) | |
tests/kms_flip: Don't use igt_fixture in an exit handler
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@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/kms_flip.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 7bf6958a..b7b42f85 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1541,10 +1541,8 @@ static void get_timestamp_format(void) static void kms_flip_exit_handler(int sig) { - igt_fixture { - if (last_connector) - kmstest_set_connector_dpms(drm_fd, last_connector, DRM_MODE_DPMS_ON); - } + if (last_connector) + kmstest_set_connector_dpms(drm_fd, last_connector, DRM_MODE_DPMS_ON); } static void test_nonblocking_read(int in) |
