Re: [PATCH v3] kunit: added lockdep support

2020-08-17 Thread Uriel Guajardo
On Sat, Aug 15, 2020 at 4:17 AM Ingo Molnar wrote: > > > * Peter Zijlstra wrote: > > > On Sat, Aug 15, 2020 at 10:30:29AM +0200, Ingo Molnar wrote: > > > > > > * Uriel Guajardo wrote: > > > > > > > From: Uriel Guajardo > > > > > > > > KUnit will fail tests upon observing a lockdep failure.

Re: [PATCH v3] kunit: added lockdep support

2020-08-15 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Sat, Aug 15, 2020 at 10:30:29AM +0200, Ingo Molnar wrote: > > > > * Uriel Guajardo wrote: > > > > > From: Uriel Guajardo > > > > > > KUnit will fail tests upon observing a lockdep failure. Because lockdep > > > turns itself off after its first failure, only

Re: [PATCH v3] kunit: added lockdep support

2020-08-15 Thread Ingo Molnar
* Uriel Guajardo wrote: > From: Uriel Guajardo > > KUnit will fail tests upon observing a lockdep failure. Because lockdep > turns itself off after its first failure, only fail the first test and > warn users to not expect any future failures from lockdep. > > Similar to

Re: [PATCH v3] kunit: added lockdep support

2020-08-15 Thread Peter Zijlstra
On Sat, Aug 15, 2020 at 10:30:29AM +0200, Ingo Molnar wrote: > > * Uriel Guajardo wrote: > > > From: Uriel Guajardo > > > > KUnit will fail tests upon observing a lockdep failure. Because lockdep > > turns itself off after its first failure, only fail the first test and > > warn users to not

Re: [PATCH v3] kunit: added lockdep support

2020-08-14 Thread Uriel Guajardo
On Fri, Aug 14, 2020 at 3:58 PM Peter Zijlstra wrote: > > On Fri, Aug 14, 2020 at 08:55:27PM +, Uriel Guajardo wrote: > > + > > +void kunit_check_lockdep(struct kunit *test, struct kunit_lockdep > > *lockdep) { > > + int saved_preempt_count = lockdep->preempt_count; > > + bool

Re: [PATCH v3] kunit: added lockdep support

2020-08-14 Thread Peter Zijlstra
On Fri, Aug 14, 2020 at 08:55:27PM +, Uriel Guajardo wrote: > + > +void kunit_check_lockdep(struct kunit *test, struct kunit_lockdep *lockdep) { > + int saved_preempt_count = lockdep->preempt_count; > + bool saved_debug_locks = lockdep->debug_locks; > + > + if

[PATCH v3] kunit: added lockdep support

2020-08-14 Thread Uriel Guajardo
From: Uriel Guajardo KUnit will fail tests upon observing a lockdep failure. Because lockdep turns itself off after its first failure, only fail the first test and warn users to not expect any future failures from lockdep. Similar to lib/locking-selftest [1], we check if the status of