diff mbox

[v2] tests/pm_sseu: Re-enable the test

Message ID 1493202489-4262-1-git-send-email-oscar.mateo@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

oscar.mateo@intel.com April 26, 2017, 10:28 a.m. UTC
This test got inadvertently disabled by commit 83884e97 (Restore
"lib: Open debugfs files for the given DRM device") when the
initialization order got changed (dbg_init before gem_init).

v2:
  - The asserts on fd are useless (Petri)
  - Deinit in inverse order.

Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
---
 tests/pm_sseu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Petri Latvala May 4, 2017, 8:37 a.m. UTC | #1
On Wed, Apr 26, 2017 at 03:28:09AM -0700, Oscar Mateo wrote:
> This test got inadvertently disabled by commit 83884e97 (Restore
> "lib: Open debugfs files for the given DRM device") when the
> initialization order got changed (dbg_init before gem_init).
> 
> v2:
>   - The asserts on fd are useless (Petri)
>   - Deinit in inverse order.
> 
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>


Thanks, pushed with R-b.


Btw, can you do

 git config format.subjectprefix "PATCH i-g-t"

for your future patches?
oscar.mateo@intel.com May 4, 2017, 1:26 p.m. UTC | #2
On 05/04/2017 08:37 AM, Petri Latvala wrote:
> On Wed, Apr 26, 2017 at 03:28:09AM -0700, Oscar Mateo wrote:
>> This test got inadvertently disabled by commit 83884e97 (Restore
>> "lib: Open debugfs files for the given DRM device") when the
>> initialization order got changed (dbg_init before gem_init).
>>
>> v2:
>>    - The asserts on fd are useless (Petri)
>>    - Deinit in inverse order.
>>
>> Cc: Petri Latvala <petri.latvala@intel.com>
>> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
>
> Thanks, pushed with R-b.
>
>
> Btw, can you do
>
>   git config format.subjectprefix "PATCH i-g-t"
>
> for your future patches?

Will do. Thanks!
diff mbox

Patch

diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c
index 317bb26..7d4b33c 100644
--- a/tests/pm_sseu.c
+++ b/tests/pm_sseu.c
@@ -187,6 +187,7 @@  dbg_get_status(struct status *stat)
 static void
 dbg_init(void)
 {
+	igt_assert(gem.init);
 	dbg.status_fd = igt_debugfs_open(gem.drm_fd, "i915_sseu_status", O_RDONLY);
 	igt_skip_on_f(dbg.status_fd == -1,
 		      "debugfs entry 'i915_sseu_status' not found\n");
@@ -354,8 +355,8 @@  full_enable(void)
 static void
 exit_handler(int sig)
 {
-	gem_deinit();
 	dbg_deinit();
+	gem_deinit();
 }
 
 igt_main
@@ -363,8 +364,8 @@  igt_main
 	igt_fixture {
 		igt_install_exit_handler(exit_handler);
 
-		dbg_init();
 		gem_init();
+		dbg_init();
 	}
 
 	igt_subtest("full-enable")