Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Laxminarayan Bharadiya, Pankaj" <pankaj.laxminarayan.bharadiya@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Latvala, Petri" <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2] tests/kms_big_fb: Use igt_assert on bufmgr
Date: Tue, 28 Jul 2020 12:18:46 +0000	[thread overview]
Message-ID: <0718a083ce3c493c810de1fa070345a3@intel.com> (raw)
In-Reply-To: <20200723121414.GD6112@intel.com>



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: 23 July 2020 17:44
> To: Laxminarayan Bharadiya, Pankaj
> <pankaj.laxminarayan.bharadiya@intel.com>
> Cc: igt-dev@lists.freedesktop.org; Latvala, Petri <petri.latvala@intel.com>
> Subject: Re: [igt-dev] [PATCH i-g-t v2] tests/kms_big_fb: Use igt_assert on
> bufmgr
> 
> On Wed, Jul 22, 2020 at 07:17:58PM +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>
> > ---
> > * 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>");
> > +
> 
> How many individual tests are you going to have to patch like this?
> Would probably make more sense to plop this into some wrapper.

Creating a wrapper only for drm_intel_bufmgr_gem_init() and leaving behind 
other drm_intel_bufmgr_* calls  unwrapped will lead to confusion. Any suggestions here?

Thanks,
Pankaj
> 
> >  		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
> 
> --
> Ville Syrjälä
> Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      reply	other threads:[~2020-07-28 12:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 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=0718a083ce3c493c810de1fa070345a3@intel.com \
    --to=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    --cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox