Util-Linux package development
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: Stanislav Brabec <sbrabec@suse.cz>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] tests: add btrfs mount tests
Date: Tue, 15 Mar 2016 00:27:24 +0100	[thread overview]
Message-ID: <201603150027.24650.sweet_f_a@gmx.de> (raw)
In-Reply-To: <56E6C863.2070909@suse.cz>

On Monday 14 March 2016, Stanislav Brabec wrote:
> On Mar 14, 2016 at 02:20 Ruediger Meier wrote:
> > On Tuesday 02 February 2016, Stanislav Brabec wrote:
> > IMO this test needs some more error handling, see below.
> >
> >> +btrfs subvol create s2 >/dev/null
> >
> > For example if you comment out above line (or if it would fail)
> > then all subtests below still succeed. This can't be right.
>
> Well, it is a test suite for mount, not btrfs. I did not add any
> error checks in the code that creates the testing image.

> Grepping through the whole test suite, I see that more than a half of
> all tests do not check for mkfs failure. Here we just have a
> multi-line mkfs.
>
> It is possible to add a check for every command there, and fail the
> test if the command fails or returns something unexpected.

You are right. I've added already some lines to skip outdated 
btrfs-tools. Nethertheless both subtests succeed even when they operate 
on an empty device without any filesystem or subvolume.

Ideally a test should be skipped if the system is broken. But if we 
don't have "skip rules" implemented yet then it should better fail than 
succeed. 

I know that we have a lot of such issues in our test suite. Just 
commented this one because it was recently added and I've noticed  it 
on existing systems.

> >> +NON_DEFAULT_SUBVOLID=$(btrfs subvol list "$TS_MOUNTPOINT-create"
> >> |
>
> NON_DEFAULT_SUBVOLID will be empty.
>
> >> "subvolid=$NON_DEFAULT_SUBVOLID" +
>
> I am not sure how kernel will interpret subvolid=.

Maybe just log the btrfs return codes to TS_OUTPUT. If we see failure in 
real life then we know that something has to be fixed, either the skip 
rules or the code to create subvols.

cu,
Rudi

      reply	other threads:[~2016-03-14 23:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 18:00 [PATCH] tests: add btrfs mount tests Stanislav Brabec
2016-02-02 20:14 ` [PATCH] tests: add btrfs mount tests (fails!) Stanislav Brabec
2016-02-03 17:00   ` Stanislav Brabec
2016-02-03 18:39     ` Stanislav Brabec
2016-02-10 16:03     ` another mount -a problem, not related to btrfs Stanislav Brabec
2016-02-11  9:43   ` [PATCH] tests: add btrfs mount tests (fails!) Karel Zak
2016-02-11 13:47     ` Stanislav Brabec
2016-02-11 16:34       ` Stanislav Brabec
2016-02-11 18:07         ` [PATCH] tests: add btrfs mount tests Stanislav Brabec
2016-02-12  9:38           ` Karel Zak
2016-02-12 10:07         ` [PATCH] tests: add btrfs mount tests (fails!) Karel Zak
2016-02-19 15:02       ` Stanislav Brabec
2016-03-09 19:13         ` Stanislav Brabec
2016-03-14  1:20 ` [PATCH] tests: add btrfs mount tests Ruediger Meier
2016-03-14 14:19   ` Stanislav Brabec
2016-03-14 23:27     ` Ruediger Meier [this message]

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=201603150027.24650.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=sbrabec@suse.cz \
    --cc=util-linux@vger.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