Re: [PATCH] Fix linked-list KUnit test when run multiple times

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

 



On Fri, Jan 24, 2020 at 11:46 AM David Gow <davidgow@xxxxxxxxxx> 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@xxxxxxxxxx>

Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>

Thanks for taking care of this!



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux