All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: tests: Add test for missing device delete error value
Date: Mon, 10 Sep 2018 19:57:20 +0200	[thread overview]
Message-ID: <20180910175720.GV24025@twin.jikos.cz> (raw)
In-Reply-To: <20180903100257.5789-1-nborisov@suse.com>

On Mon, Sep 03, 2018 at 01:02:57PM +0300, Nikolay Borisov wrote:
> Add a test which ensures the kernel returns the correct error value
> when missing device removal is requested. This test verifies that kernel
> refactoring didn't broken the return value.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  tests/misc-tests/011-delete-missing-device/test.sh | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/tests/misc-tests/011-delete-missing-device/test.sh b/tests/misc-tests/011-delete-missing-device/test.sh
> index 4c976421c091..b799a25c201d 100755
> --- a/tests/misc-tests/011-delete-missing-device/test.sh
> +++ b/tests/misc-tests/011-delete-missing-device/test.sh
> @@ -44,6 +44,21 @@ test_delete_missing()
>  	run_check_umount_test_dev
>  }
>  
> +test_missing_error()
> +{
> +	run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$TEST_DEV"
> +	run_check_mount_test_dev
> +	local out
> +	out=$(run_mustfail_stdout "Unexpected success" \

Which would become:

  unexpected success: Unexpected success

You'd win the error message of the year :) The text is supposed to be
more specific what was not expected, eg. "missing device removed".

  reply	other threads:[~2018-09-10 22:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03  9:46 [PATCH 0/3] cleanup couple of device-related functions' retval Nikolay Borisov
2018-09-03  9:46 ` [PATCH 1/3] btrfs: Make btrfs_find_device_by_path return struct btrfs_device Nikolay Borisov
2018-09-03 12:13   ` Qu Wenruo
2018-09-10 18:02   ` David Sterba
2018-09-03  9:46 ` [PATCH 2/3] btrfs: Make btrfs_find_device_missing_or_by_path return directly a device Nikolay Borisov
2018-09-03 12:23   ` Qu Wenruo
2018-09-03  9:46 ` [PATCH 3/3] btrfs: Make btrfs_find_device_by_devspec return btrfs_device directly Nikolay Borisov
2018-09-03 12:27   ` Qu Wenruo
2018-09-03 10:02 ` [PATCH] btrfs-progs: tests: Add test for missing device delete error value Nikolay Borisov
2018-09-10 17:57   ` David Sterba [this message]
2018-09-11 14:31     ` David Sterba
2018-09-10 18:07 ` [PATCH 0/3] cleanup couple of device-related functions' retval David Sterba

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=20180910175720.GV24025@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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 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.