From: Chris Wilson <chris@chris-wilson.co.uk> To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Subject: [PATCH i-g-t 1/2] igt/pm_rpm: Close local fd before trying to unload module Date: Wed, 15 Aug 2018 21:59:23 +0100 [thread overview] Message-ID: <20180815205924.6949-1-chris@chris-wilson.co.uk> (raw) Make sure everything we open in setup_environment() is paired to teardown_environment(). Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/pm_rpm.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 65489bcdb..c0212ed70 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -717,21 +717,23 @@ out: return wait_for_suspended(); } -static void restore_environment(void) +static void teardown_environment(void) { + close(msr_fd); + if (has_pc8) + close(pc8_status_fd); + + igt_restore_runtime_pm(); + igt_pm_restore_sata_link_power_management(pm_data); free(pm_data); -} -static void teardown_environment(void) -{ - restore_environment(); fini_mode_set_data(&ms_data); + close(debugfs); - drmClose(drm_fd); - close(msr_fd); - if (has_pc8) - close(pc8_status_fd); + close(drm_fd); + + has_runtime_pm = false; } static void basic_subtest(void) -- 2.18.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t 1/2] igt/pm_rpm: Close local fd before trying to unload module Date: Wed, 15 Aug 2018 21:59:23 +0100 [thread overview] Message-ID: <20180815205924.6949-1-chris@chris-wilson.co.uk> (raw) Make sure everything we open in setup_environment() is paired to teardown_environment(). Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/pm_rpm.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 65489bcdb..c0212ed70 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -717,21 +717,23 @@ out: return wait_for_suspended(); } -static void restore_environment(void) +static void teardown_environment(void) { + close(msr_fd); + if (has_pc8) + close(pc8_status_fd); + + igt_restore_runtime_pm(); + igt_pm_restore_sata_link_power_management(pm_data); free(pm_data); -} -static void teardown_environment(void) -{ - restore_environment(); fini_mode_set_data(&ms_data); + close(debugfs); - drmClose(drm_fd); - close(msr_fd); - if (has_pc8) - close(pc8_status_fd); + close(drm_fd); + + has_runtime_pm = false; } static void basic_subtest(void) -- 2.18.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2018-08-15 20:59 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-15 20:59 Chris Wilson [this message] 2018-08-15 20:59 ` [igt-dev] [PATCH i-g-t 1/2] igt/pm_rpm: Close local fd before trying to unload module Chris Wilson 2018-08-15 20:59 ` [PATCH i-g-t 2/2] igt/pm_rpm: Avoid at_exit_drm_fd Chris Wilson 2018-08-15 20:59 ` [Intel-gfx] " Chris Wilson 2018-08-17 17:42 ` [igt-dev] " Antonio Argenziano 2018-08-17 17:42 ` Antonio Argenziano 2018-08-15 22:24 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module Patchwork 2018-08-16 3:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork 2018-08-16 4:32 ` Chris Wilson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180815205924.6949-1-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.