lkml.org 
[lkml]   [2019]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 02/18] kunit: test: add test resource management API
On Wed, Jul 03, 2019 at 05:35:59PM -0700, Brendan Higgins wrote:
> diff --git a/kunit/test.c b/kunit/test.c
> index c030ba5a43e40..a70fbe449e922 100644
> --- a/kunit/test.c
> +++ b/kunit/test.c
> @@ -122,7 +122,8 @@ static void kunit_print_test_case_ok_not_ok(struct kunit_case *test_case,
>
> void kunit_init_test(struct kunit *test, const char *name)
> {
> - spin_lock_init(&test->lock);

Once you re-spin, this above line should be removed.

> + mutex_init(&test->lock);
> + INIT_LIST_HEAD(&test->resources);
> test->name = name;
> test->success = true;
> }

Luis

\
 
 \ /
  Last update: 2019-07-05 22:47    [W:0.180 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site