Thread (33 messages) 33 messages, 6 authors, 2022-06-02

Re: [PATCH v9 3/6] selftests: add tests_sysfs module

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-12-10 21:39:47
Also in: linux-block, linux-fsdevel, linux-kselftest, lkml

On Wed, Dec 08, 2021 at 05:48:25PM -0800, Luis Chamberlain wrote:
On Fri, Dec 03, 2021 at 04:29:02PM +0100, Greg KH wrote:
quoted
On Fri, Oct 29, 2021 at 11:44:57AM -0700, Luis Chamberlain wrote:
quoted
This adds a new selftest module which can be used to test sysfs, which
would otherwise require using an existing driver. This lets us muck
with a template driver to test breaking things without affecting
system behaviour or requiring the dependencies of a real device
driver.
Test sysfs "how"?  What exactly are you wanting to test?
You can look at the 32 tests added after all patches applied.
quoted
I see lots of things in this code as examples of how to NOT use sysfs,
so are you testing my review cycles?  :)
You are exagerating, there are 32 tests there and only 2 tests deal
with a deadlock which we are not yet sure how widespread it could be.
Also very important is how one test uses failure injection support to proove
how getting the kernfs active reference suffices to avoid crashes with
module removal and uses of sysfs ops in a driver, something which *you*
did not believe to be true but the code speaks for itself. This is also
why uses of try_module_get() is *safe* if used on sysfs ops.

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help