From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump Date: Mon, 14 Apr 2014 11:14:14 +0100 Message-ID: <20140414101414.GF4415@nuc-i3427.alporthouse.com> References: <1397221193-12278-1-git-send-email-oscar.mateo@intel.com> <1397234892-13820-1-git-send-email-oscar.mateo@intel.com> <20140411171224.GA4453@nuc-i3427.alporthouse.com> <92648605EABDA246B775AAB04C95A7A3012CBC6F@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id AEDBE6E03C for ; Mon, 14 Apr 2014 03:14:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: <92648605EABDA246B775AAB04C95A7A3012CBC6F@IRSMSX103.ger.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Mateo Lozano, Oscar" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Mon, Apr 14, 2014 at 10:01:12AM +0000, Mateo Lozano, Oscar wrote: > > > + &requests); > > > + if (req_matched =3D=3D 1) { > > > + igt_assert(strstr(ring_name, expected_ring_name)); > > > + igt_assert(requests =3D=3D 1); > > = > > Bad assumption. You could still have the request from > > gem_quiescent_gpu() which may not have been retired before the error > > triggers. > = > Hmmmm... but I make a first valid gem_execbuf()+gem_sync() before the one= that actually hangs. Shouldn=B4t that make sure that all previous requests= have been retired? No, I would not make that assumption about kernel behaviour. The only thing that it will guarantee is that the last request with that handle is retired. (In other words, forthcoming bug fixes already break this assumption.) = > > > + > > > + igt_assert(getline(&line, &line_size, file) > 0); > > > + items =3D sscanf(line, " seqno 0x%08x, emitted %ld, tail > > 0x%08x\n", > > > + &seqno, &jiffies, &tail); > > > + igt_assert(items =3D=3D 3); > > = > > Bad. I may change the format. s/may/will/ > = > I still need to make sure I got a valid tail, so I need to know the forma= t and fail if don=B4t understand it. Or do you want me to use a different t= ail, maybe the ringbuffer one? I didn't spot where you used tail. Care to elaborate? I may be able to suggest an alternative, or we may either code this more defensively or make the kernel emission easier to use and hopefully more informative for debugging. -Chris -- = Chris Wilson, Intel Open Source Technology Centre