[Linux-kernel-mentees] common KUnit Kconfig and file naming (was: Re: [PATCH] lib: kunit_test_overflow: add KUnit test of check_*_overflow functions)
brendanhiggins at google.com
Fri Jun 19 20:12:15 UTC 2020
On Thu, Jun 18, 2020 at 11:39 PM David Gow <davidgow at google.com> wrote:
> On Fri, Jun 19, 2020 at 4:28 AM Brendan Higgins
> <brendanhiggins at google.com> wrote:
> > On Tue, Jun 16, 2020 at 9:21 PM David Gow <davidgow at google.com> wrote:
> > >
> > > On Tue, Jun 16, 2020 at 5:40 PM Alan Maguire <alan.maguire at oracle.com> wrote:
> > > >
> > > > On Tue, 16 Jun 2020, David Gow wrote:
> > > > > <keescook at chromium.org> wrote:
> > > > > >
> > > > > > On Sat, Jun 13, 2020 at 02:51:17PM +0800, David Gow wrote:
> > > - Test names: Personally, I'd kind-of like to not prefix these at all,
> > > as they're already part of the suite. If we do want to, though, prefix
> > > them with <subsystem> and <suite>.
> > Eh, I did that to remain consistent with the kernel naming
> > conventions, but I think those have diverged too. If maintainers are
> > cool with it, I agree that the prefixes are redundant on tests and
> > generally way too long.
> Do you have a link to the conventions you're talking about?
A link no. This is only of those undocumented rules that most people follow.
The rule is something like this:
Global identifiers should be named:
For example, let's say I am working on Synopsis' DesignWare I2C master
driver. The outermost namespace is i2c, and because DesignWare is
long, we might prefix each function with i2c_dw_*.
It is a practice that is not universally maintained around the kernel,
but it seems to be the most common method of namespacing aside from
just randomly throwing characters together in a prefix that hasn't
been used before.
Anyway, standardized or not, that is the convention I was trying to follow.
More information about the Linux-kernel-mentees