All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_frontbuffer_tracking: Correctly handle debugfs errors
@ 2017-11-28 17:01 Michal Wajdeczko
  2017-11-28 17:23 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Michal Wajdeczko @ 2017-11-28 17:01 UTC (permalink / raw)
  To: intel-gfx

In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs
dir around") we introduced custom variant of __igt_debugfs_read function
that fires assert when debugfs returns an error. Replace that assert
with proper error handling to allow use of errors like -ENODEV.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index a068c8a..50019d1 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -783,7 +783,8 @@ static bool set_mode_for_params(struct modeset_params *params)
 static void __debugfs_read(const char *param, char *buf, int len)
 {
 	len = igt_sysfs_read(drm.debugfs, param, buf, len - 1);
-	igt_assert(len > 0);
+	if (len < 0)
+		len = 0;
 	buf[len] = '\0';
 }
 
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-15 13:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28 17:01 [PATCH i-g-t] tests/kms_frontbuffer_tracking: Correctly handle debugfs errors Michal Wajdeczko
2017-11-28 17:23 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-28 17:29 ` [PATCH i-g-t] " Chris Wilson
2017-12-04 10:45   ` Joonas Lahtinen
2017-12-15 12:59     ` Chris Wilson
2017-11-29  7:58 ` ✓ Fi.CI.IGT: success for " Patchwork
2017-12-13 16:59 ` ✓ Fi.CI.BAT: " Patchwork
2017-12-13 18:34 ` ✗ Fi.CI.IGT: warning " Patchwork

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.