linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>, Petr Mladek <pmladek@suse.com>
Cc: tj@kernel.org, akpm@linux-foundation.org, jeyu@kernel.org,
	shuah@kernel.org, bvanassche@acm.org, dan.j.williams@intel.com,
	joe@perches.com, tglx@linutronix.de, keescook@chromium.org,
	rostedt@goodmis.org, minchan@kernel.org,
	linux-spdx@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	copyleft-next@lists.fedorahosted.org
Subject: Re: [PATCH v9 3/6] selftests: add tests_sysfs module
Date: Fri, 10 Dec 2021 13:39:31 -0800	[thread overview]
Message-ID: <YbPJEznncIVSKQvH@bombadil.infradead.org> (raw)
In-Reply-To: <YbFgaSPPw4Y3pJoB@bombadil.infradead.org>

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:
> > On Fri, Oct 29, 2021 at 11:44:57AM -0700, Luis Chamberlain wrote:
> > > 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.
> 
> > 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

  reply	other threads:[~2021-12-10 21:39 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 18:44 [PATCH v9 0/6] test_sysfs: add new selftest for sysfs Luis Chamberlain
2021-10-29 18:44 ` [PATCH v9 1/6] LICENSES: Add the copyleft-next-0.3.1 license Luis Chamberlain
2022-05-23 21:10   ` Thomas Gleixner
2022-05-24 13:59     ` Richard Fontana
2022-05-25 17:10     ` Luis Chamberlain
2022-05-25 19:13     ` Bradley M. Kuhn
2022-05-25 21:50       ` J Lovejoy
2022-05-25 22:29         ` Bradley M. Kuhn
2022-05-23 21:22   ` Thomas Gleixner
2022-05-25 16:57     ` Luis Chamberlain
2022-05-25 20:51       ` Thomas Gleixner
2022-05-25 23:53         ` Luis Chamberlain
2022-05-23 21:27   ` Thomas Gleixner
2022-05-25 16:43     ` Luis Chamberlain
2022-05-25 17:05       ` Bird, Tim
2022-05-25 18:11         ` Luis Chamberlain
2022-05-25 19:05           ` Bird, Tim
2022-05-25 19:44             ` Luis Chamberlain
2022-05-25 22:16             ` Thomas Gleixner
2022-06-02  4:11               ` Bird, Tim
2022-06-02  6:20                 ` gregkh
2022-06-02 19:41                   ` Luis Chamberlain
2022-06-02 19:30                 ` Luis Chamberlain
2021-10-29 18:44 ` [PATCH v9 2/6] testing: use the copyleft-next-0.3.1 SPDX tag Luis Chamberlain
2021-10-29 18:44 ` [PATCH v9 3/6] selftests: add tests_sysfs module Luis Chamberlain
2021-12-03 15:29   ` Greg KH
2021-12-09  1:48     ` Luis Chamberlain
2021-12-10 21:39       ` Luis Chamberlain [this message]
2021-12-14 19:31       ` [copyleft-next] " Richard Fontana
2022-05-22 14:37     ` Thomas Gleixner
2022-05-22 14:47       ` Greg KH
2022-05-22 15:06         ` Thomas Gleixner
2022-05-23 19:37           ` Luis Chamberlain
2021-10-29 18:44 ` [PATCH v9 4/6] kernfs: add initial failure injection support Luis Chamberlain
2021-10-29 18:44 ` [PATCH v9 5/6] test_sysfs: add support to use kernfs failure injection Luis Chamberlain
2021-10-29 18:45 ` [PATCH v9 6/6] kernel/module: add documentation for try_module_get() Luis Chamberlain

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=YbPJEznncIVSKQvH@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bvanassche@acm.org \
    --cc=copyleft-next@lists.fedorahosted.org \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeyu@kernel.org \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-spdx@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.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).