All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [i-g-t] tests/kms_big_fb: Use igt_assert on bufmgr
Date: Wed, 22 Jul 2020 10:41:04 +0300	[thread overview]
Message-ID: <20200722074104.GQ20883@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200715120339.11403-1-pankaj.laxminarayan.bharadiya@intel.com>

On Wed, Jul 15, 2020 at 05:33:39PM +0530, Pankaj Bharadiya wrote:
> 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>
> ---
>  tests/kms_big_fb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index a754b2997..b19b56f90 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -649,6 +649,7 @@ igt_main
>  			data.render_copy = igt_get_render_copyfunc(data.devid);
>  
>  		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
> +		igt_assert(data.bufmgr);
>  		data.batch = intel_batchbuffer_alloc(data.bufmgr, data.devid);

Make the error message more helpful, as suggested by Chris last time
this patch was independently written by Swati:

const struct intel_device_info *info;
info = intel_get_device_info(data.devid);
igt_assert_f(data.bufmgr, "Update libdrm for %s support\n",
             info->gen ? info->codename : "<unknown chipset>");


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

      parent reply	other threads:[~2020-07-22  7:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 12:03 [igt-dev] [i-g-t] tests/kms_big_fb: Use igt_assert on bufmgr Pankaj Bharadiya
2020-07-15 13:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-07-15 18:36 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-07-21 15:57 ` [igt-dev] [i-g-t] " Karthik B S
2020-07-22  7:41 ` Petri Latvala [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200722074104.GQ20883@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=pankaj.laxminarayan.bharadiya@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.