linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Vitor Massaru Iha <vitor@massaru.org>
Cc: Marco Elver <elver@google.com>,
	mhocko@suse.com, arnd@arndb.de, torvalds@linux-foundation.org,
	Brendan Higgins <brendanhiggins@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	elfring@users.sourceforge.net, paul.gortmaker@windriver.com,
	geert@linux-m68k.org,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>,
	tglx@linutronix.de,
	linux-kernel-mentees@lists.linuxfoundation.org,
	akpm@linux-foundation.org,
	KUnit Development <kunit-dev@googlegroups.com>
Subject: Re: [Linux-kernel-mentees] [PATCH v2] lib: kunit: add list_sort test conversion to KUnit
Date: Thu, 15 Oct 2020 21:23:27 +0300	[thread overview]
Message-ID: <20201015182327.GA4077@smile.fi.intel.com> (raw)
In-Reply-To: <20201015182121.GZ4077@smile.fi.intel.com>

On Thu, Oct 15, 2020 at 09:21:21PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 15, 2020 at 02:59:05PM -0300, Vitor Massaru Iha wrote:
> > On Thu, Oct 15, 2020 at 2:47 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > On Wed, Oct 14, 2020 at 10:46:16PM -0300, Vitor Massaru Iha wrote:
> > > > This adds the conversion of the runtime tests of test_list_sort,
> > > > from `lib/test_list_sort.c` to KUnit tests.
> > >
> > > >  rename lib/{test_list_sort.c => list_sort_kunit.c} (62%)
> > >
> > > One more thing. The documentation [1] doesn't specify any name conventions.
> > > So, please leave file name untouched.
> > >
> > > [1]: https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html
> > 
> > This convention hasn't yet entered the Torvaldos tree, but it is in
> > the Shuah tree: [1]
> > 
> > +Test File and Module Names
> > +==========================
> > +
> > +KUnit tests can often be compiled as a module. These modules should be named
> > +after the test suite, followed by ``_test``. If this is likely to conflict with
> > +non-KUnit tests, the suffix ``_kunit`` can also be used.
> > +
> > +The easiest way of achieving this is to name the file containing the test suite
> > +``<suite>_test.c`` (or, as above, ``<suite>_kunit.c``). This file should be
> > +placed next to the code under test.
> > +
> > +If the suite name contains some or all of the name of the test's parent
> > +directory, it may make sense to modify the source filename to reduce
> > redundancy.
> > +For example, a ``foo_firmware`` suite could be in the ``foo/firmware_test.c``
> > +file.
> > 
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=2a41fc52c21b6ece49921716bd289bfebaadcc04
> 
> I see.
> 
> Can the rest of documentation be consistent with this? It seems half-baked,
> since examples show something different.
> 
> (Entire documentation if full of example-test.c)

Also it doesn't really clear about the test cases against header files, like
for list.h or bits.h. (There is no c-file and I'm not sure one desires to have
include/linux/*_kunit.c)

-- 
With Best Regards,
Andy Shevchenko


_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

      reply	other threads:[~2020-10-15 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  1:46 [Linux-kernel-mentees] [PATCH v2] lib: kunit: add list_sort test conversion to KUnit Vitor Massaru Iha
2020-10-15 10:51 ` Andy Shevchenko
2020-10-15 17:54   ` Vitor Massaru Iha
2020-10-15 17:48 ` Andy Shevchenko
2020-10-15 17:59   ` Vitor Massaru Iha
2020-10-15 18:21     ` Andy Shevchenko
2020-10-15 18:23       ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201015182327.GA4077@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=brendanhiggins@google.com \
    --cc=elfring@users.sourceforge.net \
    --cc=elver@google.com \
    --cc=geert@linux-m68k.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vitor@massaru.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).