lib: fix igt_reset_connectors
PATCH 1/1 lib: fix igt_reset_connectors
Use igt_debugfs_open to open the connector file, since the forced_connectors array now only stores the connector path relative to the debugfs path. Also add some extra error checking to ensure a test failure if the reset fails.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829
Signed-off-by Thomas Wood <[email protected]>
--- lib/igt_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/igt_kms.c +2 -2
@@ -1773,8 +1773,8 @@ void igt_reset_connectors(void)* functions that are not safe to call in signal handlers */ for (tmp = forced_connectors; *tmp; tmp++) { -int fd =open (*tmp,O_WRONLY |O_TRUNC ); -write (fd,"unspecified" ,11 ); +int fd =igt_debugfs_open (*tmp,O_WRONLY |O_TRUNC ); +igt_assert (write (fd,"unspecified" ,11 ) ==11 );close (fd); } }
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Thomas Wood
Use
igt_debugfs_opento open the connector file, since theforced_connectorsarray now only stores the connector path relative to the debugfs path. Also add some extra error checking to ensure a test failure if the reset fails.Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829
Signed-off-by Thomas Wood <[email protected]>
Tested-by lu hua <[email protected]>
And I went right ahead and committed it, thanks.
-Daniel
Quoted 26 lines
--- lib/igt_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)lib/igt_kms.c +2
-2@@ -1773,8 +1773,8 @@ void igt_reset_connectors(void)* functions that are not safe to call in signal handlers */ for (tmp = forced_connectors; *tmp; tmp++) { -int fd =open (*tmp,O_WRONLY |O_TRUNC ); -write (fd,"unspecified" ,11 ); +int fd =igt_debugfs_open (*tmp,O_WRONLY |O_TRUNC ); +igt_assert (write (fd,"unspecified" ,11 ) ==11 );close (fd); } }Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx