Re: [Linaro-mm-sig] [PATCH v4 3/4] mutex: Add ww tests to lib/locking-selftest.c. v4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 28, 2013 at 11:12 PM, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxx> wrote:
>>> +static void ww_test_spin_nest_unlocked(void)
>>> +{
>>> +    raw_spin_lock_nest_lock(&lock_A, &o.base);
>>> +    U(A);
>>> +}
>> I don't quite see the point of this one here ...
> It's a lockdep test that was missing. o.base is not locked. So lock_A is being nested into an unlocked lock, resulting in a lockdep error.

Sounds like a different patch then ...

>>> +
>>> +static void ww_test_unneeded_slow(void)
>>> +{
>>> +    int ret;
>>> +
>>> +    WWAI(&t);
>>> +
>>> +    ww_mutex_lock_slow(&o, &t);
>>> +}
>> I think checking the _slow debug stuff would be neat, i.e.
>> - fail/success tests for properly unlocking all held locks
>> - fail/success tests for lock_slow acquiring the right lock.
>>
>> Otherwise I didn't spot anything that seems missing in these self-tests
>> here.
>>
> Yes it would be nice, doing so is left as an excercise for the reviewer, who failed to raise this point sooner. ;-)

Hm, I guess I've volunteered myself to look into this a bit ;-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux