FSTests Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] generic: reorder output to stderr and stdout from _scratch_mkfs
@ 2020-07-11  9:23 Vladimir Zapolskiy
  2020-07-12 11:22 ` Zorro Lang
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2020-07-11  9:23 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

The change fixes false positives from generic/554 and generic/565 tests,
when supplementary output of an mkfs utility to stderr apprears to be mixed
into the test output, which results into non-empty diff with the expected
output found in *.out files.

The change unifies _scratch_mkfs redirections among all generic tests, these
two modified tests are the only ones with the swapped order of output
redirections.

Signed-off-by: Vladimir Zapolskiy <vladimir@tuxera.com>
---
 tests/generic/554 | 2 +-
 tests/generic/565 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/554 b/tests/generic/554
index eaf1f45a8d15..9a23c0eb729f 100755
--- a/tests/generic/554
+++ b/tests/generic/554
@@ -38,7 +38,7 @@ _require_scratch
 _require_xfs_io_command "copy_range"
 _require_scratch_swapfile
 
-_scratch_mkfs 2>&1 >> $seqres.full
+_scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount
 
 rm -f $seqres.full
diff --git a/tests/generic/565 b/tests/generic/565
index 41d85b919553..e23e97b763f8 100755
--- a/tests/generic/565
+++ b/tests/generic/565
@@ -38,7 +38,7 @@ _require_test
 _require_scratch
 _require_xfs_io_command "copy_range"
 
-_scratch_mkfs 2>&1 >> $seqres.full
+_scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount
 
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] generic: reorder output to stderr and stdout from _scratch_mkfs
  2020-07-11  9:23 [PATCH] generic: reorder output to stderr and stdout from _scratch_mkfs Vladimir Zapolskiy
@ 2020-07-12 11:22 ` Zorro Lang
  0 siblings, 0 replies; 2+ messages in thread
From: Zorro Lang @ 2020-07-12 11:22 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: fstests

On Sat, Jul 11, 2020 at 12:23:19PM +0300, Vladimir Zapolskiy wrote:
> The change fixes false positives from generic/554 and generic/565 tests,
> when supplementary output of an mkfs utility to stderr apprears to be mixed
> into the test output, which results into non-empty diff with the expected
> output found in *.out files.
> 
> The change unifies _scratch_mkfs redirections among all generic tests, these
> two modified tests are the only ones with the swapped order of output
> redirections.
> 
> Signed-off-by: Vladimir Zapolskiy <vladimir@tuxera.com>
> ---
>  tests/generic/554 | 2 +-
>  tests/generic/565 | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/generic/554 b/tests/generic/554
> index eaf1f45a8d15..9a23c0eb729f 100755
> --- a/tests/generic/554
> +++ b/tests/generic/554
> @@ -38,7 +38,7 @@ _require_scratch
>  _require_xfs_io_command "copy_range"
>  _require_scratch_swapfile
>  
> -_scratch_mkfs 2>&1 >> $seqres.full
> +_scratch_mkfs >>$seqres.full 2>&1

Make sense to me. If the case hopes to catch the mkfs error, it can remove
the "2>&1" directly. Or I think it hopes to write both stderr and stdout into
$seqres.full.

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  _scratch_mount
>  
>  rm -f $seqres.full
> diff --git a/tests/generic/565 b/tests/generic/565
> index 41d85b919553..e23e97b763f8 100755
> --- a/tests/generic/565
> +++ b/tests/generic/565
> @@ -38,7 +38,7 @@ _require_test
>  _require_scratch
>  _require_xfs_io_command "copy_range"
>  
> -_scratch_mkfs 2>&1 >> $seqres.full
> +_scratch_mkfs >>$seqres.full 2>&1
>  _scratch_mount
>  
>  
> -- 
> 2.25.1
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11  9:23 [PATCH] generic: reorder output to stderr and stdout from _scratch_mkfs Vladimir Zapolskiy
2020-07-12 11:22 ` Zorro Lang

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git