From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: David Gow <davidgow@google.com>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
Maxime Ripard <maxime@cerno.tech>,
Brendan Higgins <brendan.higgins@linux.dev>,
Stephen Boyd <sboyd@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Jonathan Cameron <jic23@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
kunit-dev@googlegroups.com
Subject: Re: [RFC PATCH 2/2] kunit: Add APIs for managing devices
Date: Sat, 25 Mar 2023 07:28:12 +0100 [thread overview]
Message-ID: <ZB6UfBMtntqrLlKz@kroah.com> (raw)
In-Reply-To: <20230325043104.3761770-3-davidgow@google.com>
On Sat, Mar 25, 2023 at 12:31:04PM +0800, David Gow wrote:
> Tests for drivers often require a struct device to pass to other
> functions. While it's possible to create these with
> root_device_register(), or to use something like a platform device, this
> is both a misuse of those APIs, and can be difficult to clean up after,
> for example, a failed assertion.
>
> Add two KUnit-specific functions for registering and unregistering a
> struct device:
> - kunit_device_register()
> - kunit_device_unregister()
>
> These behave similarly to root_device_register() and
> root_device_unregister() except:
> - They take a struct kunit pointer with a test context.
> - They do not create a root device directory in sysfs.
But they show up in the root directory in sysfs, in /sys/devices/ which
is not a good place to be. Why not make them part of a class, perhaps
called 'kunit', so that they will be in a contained place?
thanks,
greg k-h
next prev parent reply other threads:[~2023-03-25 6:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 4:31 [RFC PATCH 0/2] KUnit device API proposal David Gow
2023-03-25 4:31 ` [RFC PATCH 1/2] kunit: resource: Add kunit_defer() functionality David Gow
2023-03-26 6:33 ` Matti Vaittinen
2023-03-27 13:56 ` Maxime Ripard
2023-03-30 7:38 ` Benjamin Berg
2023-03-25 4:31 ` [RFC PATCH 2/2] kunit: Add APIs for managing devices David Gow
2023-03-25 6:04 ` kernel test robot
2023-03-25 6:28 ` Greg Kroah-Hartman [this message]
2023-03-25 15:14 ` kernel test robot
2023-03-27 13:57 ` Maxime Ripard
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=ZB6UfBMtntqrLlKz@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jic23@kernel.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=mazziesaccount@gmail.com \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=skhan@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.