All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2] tests/kms_big_fb: Use igt_assert on bufmgr
@ 2020-07-22 13:47 Pankaj Bharadiya
  2020-07-22 14:19 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_big_fb: Use igt_assert on bufmgr (rev2) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Pankaj Bharadiya @ 2020-07-22 13:47 UTC (permalink / raw)
  To: igt-dev, petri.latvala, pankaj.laxminarayan.bharadiya

NULL bufmgr pointer leads to SIGSEGV. Assert on NULL bufmgr so that
correct failure reason will get dumped in the stack trace.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
* changes since v1:
 - Make the error message more helpful [Petri]

 tests/kms_big_fb.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index a754b2997..48caa5cd1 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -607,6 +607,7 @@ igt_main
 {
 	igt_fixture {
 		drmModeResPtr res;
+		const struct intel_device_info *info;
 
 		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
 
@@ -649,6 +650,10 @@ igt_main
 			data.render_copy = igt_get_render_copyfunc(data.devid);
 
 		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
+		info = intel_get_device_info(data.devid);
+		igt_assert_f(data.bufmgr, "Update libdrm for %s support\n",
+			     info->gen ? info->codename : "<unknown chipset>");
+
 		data.batch = intel_batchbuffer_alloc(data.bufmgr, data.devid);
 	}
 
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-07-28 12:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 13:47 [igt-dev] [PATCH i-g-t v2] tests/kms_big_fb: Use igt_assert on bufmgr Pankaj Bharadiya
2020-07-22 14:19 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_big_fb: Use igt_assert on bufmgr (rev2) Patchwork
2020-07-22 15:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-07-23  7:34 ` [igt-dev] [PATCH i-g-t v2] tests/kms_big_fb: Use igt_assert on bufmgr Petri Latvala
2020-07-23 12:14 ` Ville Syrjälä
2020-07-28 12:18   ` Laxminarayan Bharadiya, Pankaj

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.