public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Marcos Paulo de Souza <marcos@mpdesouza.com>
Cc: Marcos Paulo de Souza <mpdesouza@suse.com>,
	dsterba@suse.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] progs: tests: misc: btrfs-{find-root,select-super} are internal commands
Date: Mon, 2 Mar 2020 08:03:48 +0800	[thread overview]
Message-ID: <2f20c573-99e7-d1bd-337f-bf2ef613e051@gmx.com> (raw)
In-Reply-To: <20200301033344.808-4-marcos@mpdesouza.com>


[-- Attachment #1.1: Type: text/plain, Size: 2634 bytes --]



On 2020/3/1 上午11:33, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> With this commit, testsuite works as expected.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>  tests/common                                        | 13 +++++++++----
>  tests/misc-tests/012-find-root-no-result/test.sh    |  2 +-
>  .../020-fix-superblock-corruption/test.sh           |  2 +-
>  3 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/common b/tests/common
> index 605cf72c..26190d85 100644
> --- a/tests/common
> +++ b/tests/common
> @@ -305,13 +305,18 @@ run_mustfail_stdout()
>  
>  check_prereq()
>  {
> -	if [ "$1" = "btrfs-corrupt-block" -o "$1" = "fssum" ]; then
> +	case "$1" in
> +	btrfs-corrupt-block|btrfs-find-root|btrfs-select-super|fssum)
>  		if ! [ -f "$INTERNAL_BIN/$1" ]; then
>  			_fail "Failed prerequisites: $INTERNAL_BIN/$1";
>  		fi
> -	elif ! [ -f "$TOP/$1" ]; then
> -		_fail "Failed prerequisites: $TOP/$1";
> -	fi
> +		;;
> +	*)
> +		if ! [ -f "$TOP/$1" ]; then
> +			_fail "Failed prerequisites: $TOP/$1";
> +		fi
> +		;;
> +	esac
>  }
>  
>  check_global_prereq()
> diff --git a/tests/misc-tests/012-find-root-no-result/test.sh b/tests/misc-tests/012-find-root-no-result/test.sh
> index 6dd447f3..edfdfd38 100755
> --- a/tests/misc-tests/012-find-root-no-result/test.sh
> +++ b/tests/misc-tests/012-find-root-no-result/test.sh
> @@ -11,7 +11,7 @@ check_prereq btrfs-image
>  run_check "$TOP/btrfs-image" -r first_meta_chunk.btrfs-image test.img || \
>  	_fail "failed to extract first_meta_chunk.btrfs-image"
>  
> -result=$(run_check_stdout "$TOP/btrfs-find-root" test.img | sed '/^Superblock/d')
> +result=$(run_check_stdout "$INTERNAL_BIN/btrfs-find-root" test.img | sed '/^Superblock/d')
>  
>  if [ -z "$result" ]; then
>  	_fail "btrfs-find-root failed to find tree root"
> diff --git a/tests/misc-tests/020-fix-superblock-corruption/test.sh b/tests/misc-tests/020-fix-superblock-corruption/test.sh
> index 404d416b..d67a87c3 100755
> --- a/tests/misc-tests/020-fix-superblock-corruption/test.sh
> +++ b/tests/misc-tests/020-fix-superblock-corruption/test.sh
> @@ -25,7 +25,7 @@ test_superblock_restore()
>  		_fail "btrfs check should detect corruption"
>  
>  	# Copy backup superblock to primary
> -	run_check "$TOP/btrfs-select-super" -s 1 "$TEST_DEV"
> +	run_check "$INTERNAL_BIN/btrfs-select-super" -s 1 "$TEST_DEV"
>  
>  	# Perform btrfs check
>  	run_check "$TOP/btrfs" check "$TEST_DEV"
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2020-03-02  0:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-01  3:33 [PATCH 0/3] progs: fix testsuite Marcos Paulo de Souza
2020-03-01  3:33 ` [PATCH 1/3] progs: Remove manpages of not packaged binaries Marcos Paulo de Souza
2020-03-01  8:26   ` Qu Wenruo
2020-03-01 14:28     ` Marcos Paulo de Souza
2020-03-02 20:02       ` David Sterba
2020-03-01  3:33 ` [PATCH 2/3] progs: Include btrfs-find-root and btrfs-select-super in testsuite Marcos Paulo de Souza
2020-03-02  0:02   ` Qu Wenruo
2020-03-01  3:33 ` [PATCH 3/3] progs: tests: misc: btrfs-{find-root,select-super} are internal commands Marcos Paulo de Souza
2020-03-02  0:03   ` Qu Wenruo [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=2f20c573-99e7-d1bd-337f-bf2ef613e051@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marcos@mpdesouza.com \
    --cc=mpdesouza@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox