linux-bcachefs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@linux.dev>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: linux-bcachefs@vger.kernel.org, dm-devel@redhat.com,
	linux-fsdevel@vger.kernel.org
Subject: Re: fuzzing bcachefs with dm-flakey
Date: Tue, 30 May 2023 19:29:00 -0400	[thread overview]
Message-ID: <ZHaGvAvFB3wWPY17@moria.home.lan> (raw)
In-Reply-To: <alpine.LRH.2.21.2305300809350.13307@file01.intranet.prod.int.rdu2.redhat.com>

On Tue, May 30, 2023 at 05:00:39PM -0400, Mikulas Patocka wrote:
> I'd like to know how do you want to do coverage analysis? By instrumenting 
> each branch and creating a test case that tests that the branch goes both 
> ways?

Documentation/dev-tools/gcov.rst. The compiler instruments each branch
and then the results are available in debugfs, then the lcov tool
produces annotated source code as html output.

> I know that people who write spacecraft-grade software do such tests, but 
> I can't quite imagine how would that work in a filesystem.
> 
> "grep -w if fs/bcachefs/*.[ch] | wc -l" shows that there are 5828 
> conditions. That's one condition for every 15.5 lines.

Most of which are covered by existing tests - but by running the
existing tests with code coverage analylis we can see which branches the
tests aren't hitting, and then we add fault injection points for those.

With fault injection we can improve test coverage a lot without needing
to write any new tests (or simple ones, for e.g. init/mount errors) 

  reply	other threads:[~2023-05-30 23:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 20:59 fuzzing bcachefs with dm-flakey Mikulas Patocka
2023-05-29 21:14 ` Matthew Wilcox
2023-05-29 23:12   ` Dave Chinner
2023-05-29 23:51     ` Kent Overstreet
2023-05-30 12:23   ` Mikulas Patocka
2023-05-29 21:43 ` Kent Overstreet
2023-05-30 21:00   ` Mikulas Patocka
2023-05-30 23:29     ` Kent Overstreet [this message]
2023-06-09 20:57       ` Mikulas Patocka
2023-06-09 22:17         ` Kent Overstreet
2023-06-02  1:13 ` Darrick J. Wong
2023-06-09 18:56   ` Mikulas Patocka
2023-06-09 19:38     ` Darrick J. Wong

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=ZHaGvAvFB3wWPY17@moria.home.lan \
    --to=kent.overstreet@linux.dev \
    --cc=dm-devel@redhat.com \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    /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).