[<prev] [next>] [day] [month] [year] [list]
Message-ID: <uddqboamqcnxwvnud5gmkkm4igvxj67xc2zw52iex5ahljtlb4@2e7ydoplg6rt>
Date: Wed, 21 Feb 2024 15:41:49 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Christian König <christian.koenig@....com>
Cc: Bagas Sanjaya <bagasdotme@...il.com>,
Erhard Furtner <erhard_f@...lbox.org>, Linux DRI Development <dri-devel@...ts.freedesktop.org>,
Huang Rui <ray.huang@....com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Karolina Stolarek <karolina.stolarek@...el.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>, Andrew Morton <akpm@...ux-foundation.org>,
Zi Yan <ziy@...dia.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>, Brendan Higgins <brendan.higgins@...ux.dev>,
David Gow <davidgow@...gle.com>, Rae Moar <rmoar@...gle.com>, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com
Subject: Re: Running ttm_device_test leads to list_add corruption. prev->next
should be next (ffffffffc05cd428), but was 6b6b6b6b6b6b6b6b.
(prev=ffffa0b1a5c034f0) (kernel 6.7.5)
Hi Christian,
On Tue, Feb 20, 2024 at 04:03:57PM +0100, Christian König wrote:
> Am 20.02.24 um 15:56 schrieb Maxime Ripard:
> > On Tue, Feb 20, 2024 at 02:28:53PM +0100, Christian König wrote:
> > > [SNIP]
> > > This kunit test is not meant to be run on real hardware, but rather just as
> > > stand a long kunit tests within user mode linux. I was assuming that it
> > > doesn't even compiles on bare metal.
> > >
> > > We should probably either double check the kconfig options to prevent
> > > compiling it or modify the test so that it can run on real hardware as well.
> > I think any cross-compiled kunit run will be impossible to differentiate
> > from running on real hardware. We should just make it work there.
>
> The problem is what the unit test basically does is registering and
> destroying a dummy device to see if initializing and tear down of the global
> pools work correctly.
>
> If you run on real hardware and have a real device
I assume you mean a real DRM device backed by TTM here, right?
> additionally to the dummy device the reference count of the global
> pool never goes down to zero and so it is never torn down.
>
> So running this test just doesn't make any sense in that environment.
> Any idea how to work around that?
I've added David, Brendan and Rae in Cc.
To sum up the problem, your tests are relying on the mock device created
to run a kunit test to be the sole DRM device in the system. But if you
compile a kernel with the kunit tests enabled and boot that on a real
hardware, then that assumption might not be true anymore and things
break apart. Is that a fair description?
If so, maybe we could detect if it's running under qemu or UML (if
that's something we can do in the first place), and then extend
kunit_attributes to only run that test if it's in a simulated
environment.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists