[Intel-gfx] [PATCH] tests/pm_sseu: Re-enable the test
Petri Latvala
petri.latvala at intel.com
Wed Apr 26 08:57:51 UTC 2017
On Tue, Apr 18, 2017 at 04:45:29PM -0700, Oscar Mateo wrote:
> This test got inadvertently disabled by commit 83884e97 (Restore
> "lib: Open debugfs files for the given DRM device").
>
> Cc: Jeff McGee <jeff.mcgee at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
> tests/pm_sseu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c
> index c0c86a4..89fd2cf 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_fd(gem.drm_fd);
The real issue was that gem_init() needs to happen before dbg_init(),
as fixed below. This assert does not check for the incorrect order,
all it does is check that the fd is >= 0, and an uninitialized global
is zero.
> 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");
> @@ -252,6 +253,7 @@ static void
> gem_init(void)
> {
> gem.drm_fd = drm_open_driver(DRIVER_INTEL);
> + igt_assert_fd(gem.drm_fd);
drm_open_driver() already does this assert.
--
Petri Latvala
> gem.init = 1;
>
> gem.devid = intel_get_drm_devid(gem.drm_fd);
> @@ -363,8 +365,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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list