tests/pm_sseu: Re-enable the test
PATCH 1/1 tests/pm_sseu: Re-enable the test
This test got inadvertently disabled by commit 83884e97 (Restore "lib: Open debugfs files for the given DRM device").
--- tests/pm_sseu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/pm_sseu.c +3 -1
@@ -187,6 +187,7 @@ dbg_get_status(struct status *stat)static void dbg_init (void ) { +igt_assert_fd (gem.drm_fd); 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 voidgem_init (void) { gem.drm_fd =drm_open_driver (DRIVER_INTEL ); +igt_assert_fd (gem.drm_fd); 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" )
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Oscar Mateo
This test got inadvertently disabled by commit
83884e97(Restore "lib: Open debugfs files for the given DRM device").Cc Jeff McGee <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>
-Michał
Quoted 3 lines
--- tests/pm_sseu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 15 lines · Oscar Mateo
This test got inadvertently disabled by commit
83884e97(Restore "lib: Open debugfs files for the given DRM device").Cc Jeff McGee <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- tests/pm_sseu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/pm_sseu.c +0
-0
tests/pm_sseu.c dbg_get_status(struct status *stat) · line 190
Quoted 4 lines
tests/pm_sseu.c +1
-0@@ -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.
tests/pm_sseu.c static void · line 256
Quoted 8 lines
tests/pm_sseu.c +1
-0dbg.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 voidgem_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
Quoted 20 lines
tests/pm_sseu.c +1
-1gem.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" )Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 tests/pm_sseu: Re-enable the test
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.
--- tests/pm_sseu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/pm_sseu.c +3 -2
@@ -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" )
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Oscar Mateo
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_initbeforegem_init).v2:
- The asserts on fd are useless (Petri)
- Deinit in inverse order.Cc Petri Latvala <[email protected]>Signed-off-by Oscar Mateo <[email protected]>
Thanks, pushed with R-b.
Btw, can you do
git config format.subjectprefix "PATCH i-g-t"
for your future patches?
Signature · 5 lines
Petri Latvala _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Petri Latvala
Quoted 10 lines · Oscar Mateo
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_initbeforegem_init).v2:
- The asserts on fd are useless (Petri)
- Deinit in inverse order.Cc Petri Latvala <[email protected]>Signed-off-by Oscar Mateo <[email protected]>
Quoted 8 lines
Thanks, pushed with R-b.
Btw, can you do
git config format.subjectprefix "PATCH i-g-t"
for your future patches?
Will do. Thanks!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx