mbox series

[v2,0/6] kunit: Fix formatting of KUNIT tests to meet the standard

Message ID cover.1618388989.git.npache@redhat.com
Headers show
Series kunit: Fix formatting of KUNIT tests to meet the standard | expand

Message

Nico Pache April 14, 2021, 8:58 a.m. UTC
There are few instances of KUNIT tests that are not properly defined.
This commit focuses on correcting these issues to match the standard
defined in the Documentation.

Issues Fixed:
 - tests should end in KUNIT_TEST, some fixes have been applied to
   correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.
 - Tests should default to KUNIT_ALL_TESTS
 - Tests configs tristate should have if !KUNIT_ALL_TESTS

No functional changes other than CONFIG name changes

Changes since v2:
 - Split patch 1 by subcomponents
 - fix issues where config was *KUNIT_TEST_TEST
 - properly threaded/chained messages

Nico Pache (6):
  kunit: ASoC: topology: adhear to KUNIT formatting standard
  kunit: software node: adhear to KUNIT formatting standard
  kunit: ext4: adhear to KUNIT formatting standard
  kunit: lib: adhear to KUNIT formatting standard
  kunit: mptcp: adhear to KUNIT formatting standard
  m68k: update configs to match the proper KUNIT syntax

 arch/m68k/configs/amiga_defconfig    |  6 +++---
 arch/m68k/configs/apollo_defconfig   |  6 +++---
 arch/m68k/configs/atari_defconfig    |  6 +++---
 arch/m68k/configs/bvme6000_defconfig |  6 +++---
 arch/m68k/configs/hp300_defconfig    |  6 +++---
 arch/m68k/configs/mac_defconfig      |  6 +++---
 arch/m68k/configs/multi_defconfig    |  6 +++---
 arch/m68k/configs/mvme147_defconfig  |  6 +++---
 arch/m68k/configs/mvme16x_defconfig  |  6 +++---
 arch/m68k/configs/q40_defconfig      |  6 +++---
 arch/m68k/configs/sun3_defconfig     |  6 +++---
 arch/m68k/configs/sun3x_defconfig    |  6 +++---
 drivers/base/test/Kconfig            |  2 +-
 drivers/base/test/Makefile           |  2 +-
 fs/ext4/.kunitconfig                 |  2 +-
 fs/ext4/Kconfig                      |  2 +-
 fs/ext4/Makefile                     |  2 +-
 lib/Kconfig.debug                    | 21 +++++++++++++--------
 lib/Makefile                         |  6 +++---
 net/mptcp/Kconfig                    |  2 +-
 net/mptcp/Makefile                   |  2 +-
 net/mptcp/crypto.c                   |  2 +-
 net/mptcp/token.c                    |  2 +-
 sound/soc/Kconfig                    |  2 +-
 sound/soc/Makefile                   |  4 ++--
 25 files changed, 64 insertions(+), 59 deletions(-)

Comments

Mark Brown April 14, 2021, 4:06 p.m. UTC | #1
On Wed, 14 Apr 2021 04:58:03 -0400, Nico Pache wrote:
> There are few instances of KUNIT tests that are not properly defined.
> This commit focuses on correcting these issues to match the standard
> defined in the Documentation.
> 
> Issues Fixed:
>  - tests should end in KUNIT_TEST, some fixes have been applied to
>    correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.
>  - Tests should default to KUNIT_ALL_TESTS
>  - Tests configs tristate should have if !KUNIT_ALL_TESTS
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/6] kunit: ASoC: topology: adhear to KUNIT formatting standard
      commit: b5fb388da472a69858355560d803602e0ace1006

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Theodore Ts'o April 18, 2021, 7:39 p.m. UTC | #2
On Wed, Apr 14, 2021 at 04:58:03AM -0400, Nico Pache wrote:
> There are few instances of KUNIT tests that are not properly defined.
> This commit focuses on correcting these issues to match the standard
> defined in the Documentation.

The word "standard" seems to be over-stating things.  The
documentation currently states, "they _usually_ have config options
ending in ``_KUNIT_TEST'' (emphasis mine).  I can imagine that there
might be some useful things we can do from a tooling perspective if we
do standardize things, but if you really want to make it a "standard",
we should first update the manpage to say so, and explain why (e.g.,
so that we can easily extract out all of the kunit test modules, and
perhaps paint a vision of what tools might be able to do with such a
standard).

Alternatively, the word "standard" could perhaps be changed to
"convention", which I think more accurately defines how things work at
the moment.

> Nico Pache (6):
>   kunit: ASoC: topology: adhear to KUNIT formatting standard
>   kunit: software node: adhear to KUNIT formatting standard
>   kunit: ext4: adhear to KUNIT formatting standard
>   kunit: lib: adhear to KUNIT formatting standard
>   kunit: mptcp: adhear to KUNIT formatting standard
>   m68k: update configs to match the proper KUNIT syntax

Also, "adhear" is not the correct spelling; the correct spelling is
"adhere" (from the Latin verb "adhaerere", "to stick", as in "to hold
fast or stick by as if by gluing", which then became "to bind oneself
to the observance of a set of rules or standards or practices").

       		       	      	       		 - Ted
Nico Pache April 22, 2021, 8:39 p.m. UTC | #3
On 4/18/21 3:39 PM, Theodore Ts'o wrote:

> On Wed, Apr 14, 2021 at 04:58:03AM -0400, Nico Pache wrote:
>> There are few instances of KUNIT tests that are not properly defined.
>> This commit focuses on correcting these issues to match the standard
>> defined in the Documentation.
> The word "standard" seems to be over-stating things.  The
> documentation currently states, "they _usually_ have config options
> ending in ``_KUNIT_TEST'' (emphasis mine).  I can imagine that there
> might be some useful things we can do from a tooling perspective if we
> do standardize things, but if you really want to make it a "standard",
> we should first update the manpage to say so, 

KUNIT Maintainers, should we go ahead and make this the "standard"?

As Ted has stated...  consistency with 'grep' is my desired outcome.

> and explain why (e.g.,
> so that we can easily extract out all of the kunit test modules, and
> perhaps paint a vision of what tools might be able to do with such a
> standard).
>
> Alternatively, the word "standard" could perhaps be changed to
> "convention", which I think more accurately defines how things work at
> the moment.Nico Pache (6):
>   kunit: ASoC: topology: adhear to KUNIT formatting standard
>   kunit: software node: adhear to KUNIT formatting standard
>   kunit: ext4: adhear to KUNIT formatting standard
>   kunit: lib: adhear to KUNIT formatting standard
>   kunit: mptcp: adhear to KUNIT formatting standard
>   m68k: update configs to match the proper KUNIT syntax
>
> Also, "adhear" is not the correct spelling; the correct spelling is
> "adhere" (from the Latin verb "adhaerere", "to stick", as in "to hold
> fast or stick by as if by gluing", which then became "to bind oneself
> to the observance of a set of rules or standards or practices").
>
>        		       	      	       		 - Ted

Whoops... Made that mistake in my v1 and inadvertently copied it over

to all the patches.


Cheers!

-- Nico
David Gow April 23, 2021, 6:26 a.m. UTC | #4
On Fri, Apr 23, 2021 at 4:39 AM Nico Pache <npache@redhat.com> wrote:
>
> On 4/18/21 3:39 PM, Theodore Ts'o wrote:
>
> > On Wed, Apr 14, 2021 at 04:58:03AM -0400, Nico Pache wrote:
> >> There are few instances of KUNIT tests that are not properly defined.
> >> This commit focuses on correcting these issues to match the standard
> >> defined in the Documentation.
> > The word "standard" seems to be over-stating things.  The
> > documentation currently states, "they _usually_ have config options
> > ending in ``_KUNIT_TEST'' (emphasis mine).  I can imagine that there
> > might be some useful things we can do from a tooling perspective if we
> > do standardize things, but if you really want to make it a "standard",
> > we should first update the manpage to say so,
>
> KUNIT Maintainers, should we go ahead and make this the "standard"?
>
> As Ted has stated...  consistency with 'grep' is my desired outcome.
>

The intention here is for this to be a "standard", with the caveat
that there may be reasons for not following said standard, though they
should be rare and may result in incompatibility with some tooling.
This is broadly laid out in the opening of the
Development/dev-tools/style.rst document, albeit still referring to
"guidelines" rather than a "standard". The rest of the document does,
as Ted pointed out, become more descriptive than prescriptive in some
sections (like the Kconfig entry one): assuming no-one is particularly
unhappy with that being tightened up, I've no problem with rewording
it.

That being said, when it comes to tooling, the Kconfig name does seem
like it's less important than it could've been: the existence of a
KUNIT_ALL_TESTS option, as well as support for having
per-directory/per-subsystem .kunitconfig files should hopefully mean
there's no need for tools to search for entries ending in _KUNIT_TEST.
(I do agree that it makes using 'grep' more convenient, though.)

> > and explain why (e.g.,
> > so that we can easily extract out all of the kunit test modules, and
> > perhaps paint a vision of what tools might be able to do with such a
> > standard).
> >
> > Alternatively, the word "standard" could perhaps be changed to
> > "convention", which I think more accurately defines how things work at
> > the moment.

Cheers,
-- David