[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFd5g46Jym_HX+QmX8ffVYfL1KATNjs9U6sR1Qv9SoVLx5GKDg@mail.gmail.com>
Date: Fri, 24 Jan 2020 14:01:34 -0800
From: Brendan Higgins <brendanhiggins@...gle.com>
To: David Gow <davidgow@...gle.com>
Cc: shuah <shuah@...nel.org>,
KUnit Development <kunit-dev@...glegroups.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alan Maguire <alan.maguire@...cle.com>
Subject: Re: [PATCH] Fix linked-list KUnit test when run multiple times
On Fri, Jan 24, 2020 at 11:46 AM David Gow <davidgow@...gle.com> wrote:
>
> A few of the lists used in the linked-list KUnit tests (the
> for_each_entry{,_reverse} tests) are declared 'static', and so are
> not-reinitialised if the test runs multiple times. This was not a
> problem when KUnit tests were run once on startup, but when tests are
> able to be run manually (e.g. from debugfs[1]), this is no longer the
> case.
>
> Making these lists no longer 'static' causes the lists to be
> reinitialised, and the test passes each time it is run. While there may
> be some value in testing that initialising static lists works, the
> for_each_entry_* tests are unlikely to be the right place for it.
Oh good, I am glad we are getting rid of those static variables. (I
thought we already dropped those - whoops.) I think this drops this
last of them, can you confirm David?
Regardless, this patch looks good to me.
> Signed-off-by: David Gow <davidgow@...gle.com>
Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
Thanks for taking care of this!
Powered by blists - more mailing lists