All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oscar Mateo <oscar.mateo@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2] tests/pm_sseu: Re-enable the test
Date: Wed, 26 Apr 2017 03:28:09 -0700	[thread overview]
Message-ID: <1493202489-4262-1-git-send-email-oscar.mateo@intel.com> (raw)
In-Reply-To: <20170426085751.4al7hnwbday6j7iv@platvala-desk.ger.corp.intel.com>

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(-)

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")
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-26 17:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 23:45 [PATCH] tests/pm_sseu: Re-enable the test Oscar Mateo
2017-04-21 15:59 ` Michał Winiarski
2017-04-26  8:57 ` Petri Latvala
2017-04-26 10:28   ` Oscar Mateo [this message]
2017-05-04  8:37     ` [PATCH v2] " Petri Latvala
2017-05-04 13:26       ` Oscar Mateo

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=1493202489-4262-1-git-send-email-oscar.mateo@intel.com \
    --to=oscar.mateo@intel.com \
    --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: link
Be 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.