Re: [PATCH v2] lib: kunit: Convert test_sort to KUnit test

From: Andy Shevchenko
Date: Wed Jul 29 2020 - 15:19:55 EST


On Wed, Jul 29, 2020 at 04:11:51PM -0300, Vitor Massaru Iha wrote:
> This adds the conversion of the test_sort.c to KUnit test.
>
> Please apply this commit first (linux-kselftest/kunit-fixes):
> 3f37d14b8a3152441f36b6bc74000996679f0998 kunit: kunit_config: Fix parsing of CONFIG options with space

Looks like you mixed up commit message and changelog / comments.

> Code Style Documentation: [0]
>
> Fix these warnings Reported-by lkp@xxxxxxxxx
>
> WARNING: modpost: vmlinux.o(.data+0x4fc70): Section mismatch in reference from the variable sort_test_cases to the variable .init.text:sort_test
> The variable sort_test_cases references
> the variable __init sort_test
> If the reference is valid then annotate the
> variable with or __refdata (see linux/init.h) or name the variable
>
> WARNING: modpost: lib/sort_kunit.o(.data+0x11c): Section mismatch in reference from the variable sort_test_cases to the function .init.text:sort_test()
> The variable sort_test_cases references
> the function __init sort_test()

> Signed-off-by: Vitor Massaru Iha <vitor@xxxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Link: [0] https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-davidgow@xxxxxxxxxx/T/#u

This should be in different order: Link, Reported-by, SoB.
Also [0] is unnecessary

> lib/{test_sort.c => sort_kunit.c} | 31 +++++++++++++++----------------

Still opened question why kunit is a suffix? Can't we leave same name? Can't we
do it rather prefix?

--
With Best Regards,
Andy Shevchenko