mbox series

[v2,0/5] cpumask: KUnit test suite fixes and improvements

Message ID cover.1661007338.git.sander@svanheule.net (mailing list archive)
Headers show
Series cpumask: KUnit test suite fixes and improvements | expand

Message

Sander Vanheule Aug. 20, 2022, 3:03 p.m. UTC
This series fixes the reported issues, and implements the suggested
improvements, for the version of the cpumask tests [1] that was merged
with commit c41e8866c28c ("lib/test: introduce cpumask KUnit test
suite").

These changes include fixes for the tests, and better alignment with the
KUnit style guidelines.

[1] https://lore.kernel.org/all/85217b5de6d62257313ad7fde3e1969421acad75.1659077534.git.sander@svanheule.net/

Changes since v1:
Link: https://lore.kernel.org/lkml/cover.1660068429.git.sander@svanheule.net/
- Collect tags
- Rewrite commit message of "lib/test_cpumask: drop cpu_possible_mask
  full test"
- Also CC KUnit mailing list

Sander Vanheule (5):
  lib/test_cpumask: drop cpu_possible_mask full test
  lib/test_cpumask: fix cpu_possible_mask last test
  lib/test_cpumask: follow KUnit style guidelines
  lib/cpumask_kunit: log mask contents
  lib/cpumask_kunit: add tests file to MAINTAINERS

 MAINTAINERS                             |  1 +
 lib/Kconfig.debug                       |  7 +++++--
 lib/Makefile                            |  2 +-
 lib/{test_cpumask.c => cpumask_kunit.c} | 13 +++++++++++--
 4 files changed, 18 insertions(+), 5 deletions(-)
 rename lib/{test_cpumask.c => cpumask_kunit.c} (90%)

Comments

Yury Norov Aug. 20, 2022, 10:06 p.m. UTC | #1
On Sat, Aug 20, 2022 at 05:03:08PM +0200, Sander Vanheule wrote:
> This series fixes the reported issues, and implements the suggested
> improvements, for the version of the cpumask tests [1] that was merged
> with commit c41e8866c28c ("lib/test: introduce cpumask KUnit test
> suite").
> 
> These changes include fixes for the tests, and better alignment with the
> KUnit style guidelines.

I wrote a couple comments, but the series looks OK to me in general.
So for 2, 3 and 5:
Acked-by: Yury Norov <yury.norov@gmail.com>

It's named as 'fix', but it fixes a test, and the kernel code itself
looks correct. So, do you want to take it into 6.0-rc, or in 6.1?

I'm OK to do it this way or another, but for later -rc's it may look
too noisy. And I'm not sure where to put a threshold.

Thanks,
Yury
 
> [1] https://lore.kernel.org/all/85217b5de6d62257313ad7fde3e1969421acad75.1659077534.git.sander@svanheule.net/
> 
> Changes since v1:
> Link: https://lore.kernel.org/lkml/cover.1660068429.git.sander@svanheule.net/
> - Collect tags
> - Rewrite commit message of "lib/test_cpumask: drop cpu_possible_mask
>   full test"
> - Also CC KUnit mailing list
> 
> Sander Vanheule (5):
>   lib/test_cpumask: drop cpu_possible_mask full test
>   lib/test_cpumask: fix cpu_possible_mask last test
>   lib/test_cpumask: follow KUnit style guidelines
>   lib/cpumask_kunit: log mask contents
>   lib/cpumask_kunit: add tests file to MAINTAINERS
> 
>  MAINTAINERS                             |  1 +
>  lib/Kconfig.debug                       |  7 +++++--
>  lib/Makefile                            |  2 +-
>  lib/{test_cpumask.c => cpumask_kunit.c} | 13 +++++++++++--
>  4 files changed, 18 insertions(+), 5 deletions(-)
>  rename lib/{test_cpumask.c => cpumask_kunit.c} (90%)
> 
> -- 
> 2.37.2
Sander Vanheule Aug. 21, 2022, 1:25 p.m. UTC | #2
Hi Yury,

On Sat, 2022-08-20 at 15:06 -0700, Yury Norov wrote:
> On Sat, Aug 20, 2022 at 05:03:08PM +0200, Sander Vanheule wrote:
> > This series fixes the reported issues, and implements the suggested
> > improvements, for the version of the cpumask tests [1] that was merged
> > with commit c41e8866c28c ("lib/test: introduce cpumask KUnit test
> > suite").
> > 
> > These changes include fixes for the tests, and better alignment with the
> > KUnit style guidelines.
> 
> I wrote a couple comments, but the series looks OK to me in general.
> So for 2, 3 and 5:
> Acked-by: Yury Norov <yury.norov@gmail.com>
> 
> It's named as 'fix', but it fixes a test, and the kernel code itself
> looks correct. So, do you want to take it into 6.0-rc, or in 6.1?
> 
> I'm OK to do it this way or another, but for later -rc's it may look
> too noisy. And I'm not sure where to put a threshold.

Broken tests are worse than no tests IMHO, so I would at least like patches 1
and 2 to be merged for 6.0-rc. I don't want people to end up with false
positives, like MaĆ­ra did, for an entire release cycle.

Preferably I would also like to see 3 in 6.0-rc, so no renames will be needed in
6.1 anymore. Not that I expect anything to depend on this symbol (or filename)
by then, but I feel it's better not to risk that by waiting for 6.1.

Patches 4 and 5 can go with 6.1, as far as I'm concerned. Especially as the mask
logging patch (4) may need some work still.

Best,
Sander