* [PATCH] fstests: fix _filter_mkfs regression on btrfs
@ 2015-03-26 17:28 Eric Sandeen
2015-03-27 4:06 ` Eryu Guan
2015-03-27 20:44 ` [PATCH V2] " Eric Sandeen
0 siblings, 2 replies; 4+ messages in thread
From: Eric Sandeen @ 2015-03-26 17:28 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs
commit:
5e8b9e6 btrfs: add regression test for remount with thread_pool resized
did weird things to _filter_mkfs; aside from broken indentation,
it also short-circuited the default non-xfs behavior, which was to
emit a default block & inode size. And that was all because btrfs/082
was using _filter_mkfs & not redirecting output away as per normal.
Granted, it's not super clear that _filter_mkfs serves this rather
unique purpose, but anyway...
And, while having this default seems to be of questionable value,
not emitting *anything* led to this on btrfs:
+./tests/generic/204: line 76: space / (isize + dbsize): division by 0 (error token is ")")
because those variables don't get set for btrfs, thanks to the
above commit.
So take out the use of _filter_mkfs in btrfs/082, and take out the
munging of _filter_mkfs which broke generic/204, and get things back
to something semi-sane.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/common/filter b/common/filter
index 71ef2e2..05dbae6 100644
--- a/common/filter
+++ b/common/filter
@@ -137,10 +137,6 @@ _filter_mkfs()
case $FSTYP in
xfs)
;;
- btrfs)
- sed -e "/Performing full device TRIM/d" \
- -e "/Turning ON incompat feature/d"
- return ;;
*)
cat - >/dev/null
perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
diff --git a/tests/btrfs/082 b/tests/btrfs/082
index dd3c87e..1324d27 100755
--- a/tests/btrfs/082
+++ b/tests/btrfs/082
@@ -55,7 +55,7 @@ _supported_fs btrfs
_supported_os Linux
_require_scratch
-_scratch_mkfs |& _filter_mkfs
+_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o thread_pool=6"
_scratch_mount "-o remount,thread_pool=10"
diff --git a/tests/generic/204 b/tests/generic/204
index d6bb094..13069d8 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -60,6 +60,7 @@ _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null \
| _filter_mkfs 2> $tmp.mkfs > /dev/null
_scratch_mount
+# Source $tmp.mkfs to get geometry
. $tmp.mkfs
# fix the reserve block pool to a known size so that the enospc calculations
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fstests: fix _filter_mkfs regression on btrfs
2015-03-26 17:28 [PATCH] fstests: fix _filter_mkfs regression on btrfs Eric Sandeen
@ 2015-03-27 4:06 ` Eryu Guan
2015-03-27 20:44 ` [PATCH V2] " Eric Sandeen
1 sibling, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2015-03-27 4:06 UTC (permalink / raw)
To: Eric Sandeen; +Cc: fstests, linux-btrfs
On Thu, Mar 26, 2015 at 12:28:42PM -0500, Eric Sandeen wrote:
> commit:
>
> 5e8b9e6 btrfs: add regression test for remount with thread_pool resized
>
> did weird things to _filter_mkfs; aside from broken indentation,
> it also short-circuited the default non-xfs behavior, which was to
> emit a default block & inode size. And that was all because btrfs/082
> was using _filter_mkfs & not redirecting output away as per normal.
>
> Granted, it's not super clear that _filter_mkfs serves this rather
> unique purpose, but anyway...
>
> And, while having this default seems to be of questionable value,
> not emitting *anything* led to this on btrfs:
>
> +./tests/generic/204: line 76: space / (isize + dbsize): division by 0 (error token is ")")
>
> because those variables don't get set for btrfs, thanks to the
> above commit.
>
> So take out the use of _filter_mkfs in btrfs/082, and take out the
> munging of _filter_mkfs which broke generic/204, and get things back
> to something semi-sane.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested by running btrfs/082 and generic/204 on btrfs and all worked fine
One minor issue below
> ---
>
>
> diff --git a/common/filter b/common/filter
> index 71ef2e2..05dbae6 100644
> --- a/common/filter
> +++ b/common/filter
> @@ -137,10 +137,6 @@ _filter_mkfs()
> case $FSTYP in
> xfs)
> ;;
> - btrfs)
> - sed -e "/Performing full device TRIM/d" \
> - -e "/Turning ON incompat feature/d"
> - return ;;
> *)
> cat - >/dev/null
> perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
>
> diff --git a/tests/btrfs/082 b/tests/btrfs/082
> index dd3c87e..1324d27 100755
> --- a/tests/btrfs/082
> +++ b/tests/btrfs/082
> @@ -55,7 +55,7 @@ _supported_fs btrfs
> _supported_os Linux
> _require_scratch
>
> -_scratch_mkfs |& _filter_mkfs
> +_scratch_mkfs >>$seqres.full 2>&1
Should rm -f $seqres.full, or the file is growing forever.
But I think simply >/dev/null is fine too, the following _scratch_mount
could catch any mkfs error.
Anyway, with this fixed:
Reviewed-by: Eryu Guan <eguan@redhat.com>
>
> _scratch_mount "-o thread_pool=6"
> _scratch_mount "-o remount,thread_pool=10"
>
> diff --git a/tests/generic/204 b/tests/generic/204
> index d6bb094..13069d8 100755
> --- a/tests/generic/204
> +++ b/tests/generic/204
> @@ -60,6 +60,7 @@ _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null \
> | _filter_mkfs 2> $tmp.mkfs > /dev/null
> _scratch_mount
>
> +# Source $tmp.mkfs to get geometry
> . $tmp.mkfs
>
> # fix the reserve block pool to a known size so that the enospc calculations
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] fstests: fix _filter_mkfs regression on btrfs
2015-03-26 17:28 [PATCH] fstests: fix _filter_mkfs regression on btrfs Eric Sandeen
2015-03-27 4:06 ` Eryu Guan
@ 2015-03-27 20:44 ` Eric Sandeen
2015-03-28 12:28 ` Filipe David Manana
1 sibling, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2015-03-27 20:44 UTC (permalink / raw)
To: Eric Sandeen, fstests; +Cc: linux-btrfs
commit:
5e8b9e6 btrfs: add regression test for remount with thread_pool resized
did weird things to _filter_mkfs; aside from broken indentation,
it also short-circuited the default non-xfs behavior, which was to
emit a default block & inode size. And that was all because btrfs/082
was using _filter_mkfs & not redirecting output away as per normal.
Granted, it's not super clear that _filter_mkfs serves this rather
unique purpose, but anyway...
And, while having this default seems to be of questionable value,
not emitting *anything* led to this on btrfs:
+./tests/generic/204: line 76: space / (isize + dbsize): division by 0 (error token is ")")
because those variables don't get set for btrfs, thanks to the
above commit.
So take out the use of _filter_mkfs in btrfs/082, and take out the
munging of _filter_mkfs which broke generic/204, and get things back
to something semi-sane.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
V2: truncate seqres.full on first write, thanks Eryu!
diff --git a/common/filter b/common/filter
index 71ef2e2..05dbae6 100644
--- a/common/filter
+++ b/common/filter
@@ -137,10 +137,6 @@ _filter_mkfs()
case $FSTYP in
xfs)
;;
- btrfs)
- sed -e "/Performing full device TRIM/d" \
- -e "/Turning ON incompat feature/d"
- return ;;
*)
cat - >/dev/null
perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
diff --git a/tests/btrfs/082 b/tests/btrfs/082
index dd3c87e..1324d27 100755
--- a/tests/btrfs/082
+++ b/tests/btrfs/082
@@ -55,7 +55,7 @@ _supported_fs btrfs
_supported_os Linux
_require_scratch
-_scratch_mkfs |& _filter_mkfs
+_scratch_mkfs >$seqres.full 2>&1
_scratch_mount "-o thread_pool=6"
_scratch_mount "-o remount,thread_pool=10"
diff --git a/tests/generic/204 b/tests/generic/204
index d6bb094..13069d8 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -60,6 +60,7 @@ _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null \
| _filter_mkfs 2> $tmp.mkfs > /dev/null
_scratch_mount
+# Source $tmp.mkfs to get geometry
. $tmp.mkfs
# fix the reserve block pool to a known size so that the enospc calculations
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] fstests: fix _filter_mkfs regression on btrfs
2015-03-27 20:44 ` [PATCH V2] " Eric Sandeen
@ 2015-03-28 12:28 ` Filipe David Manana
0 siblings, 0 replies; 4+ messages in thread
From: Filipe David Manana @ 2015-03-28 12:28 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, fstests, linux-btrfs
On Fri, Mar 27, 2015 at 8:44 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
> commit:
>
> 5e8b9e6 btrfs: add regression test for remount with thread_pool resized
>
> did weird things to _filter_mkfs; aside from broken indentation,
> it also short-circuited the default non-xfs behavior, which was to
> emit a default block & inode size. And that was all because btrfs/082
> was using _filter_mkfs & not redirecting output away as per normal.
>
> Granted, it's not super clear that _filter_mkfs serves this rather
> unique purpose, but anyway...
>
> And, while having this default seems to be of questionable value,
> not emitting *anything* led to this on btrfs:
>
> +./tests/generic/204: line 76: space / (isize + dbsize): division by 0 (error token is ")")
>
> because those variables don't get set for btrfs, thanks to the
> above commit.
>
> So take out the use of _filter_mkfs in btrfs/082, and take out the
> munging of _filter_mkfs which broke generic/204, and get things back
> to something semi-sane.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Thanks, I had reported this recently as well [1].
[1] http://www.spinics.net/lists/linux-btrfs/msg42117.html
> ---
>
> V2: truncate seqres.full on first write, thanks Eryu!
>
> diff --git a/common/filter b/common/filter
> index 71ef2e2..05dbae6 100644
> --- a/common/filter
> +++ b/common/filter
> @@ -137,10 +137,6 @@ _filter_mkfs()
> case $FSTYP in
> xfs)
> ;;
> - btrfs)
> - sed -e "/Performing full device TRIM/d" \
> - -e "/Turning ON incompat feature/d"
> - return ;;
> *)
> cat - >/dev/null
> perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
>
> diff --git a/tests/btrfs/082 b/tests/btrfs/082
> index dd3c87e..1324d27 100755
> --- a/tests/btrfs/082
> +++ b/tests/btrfs/082
> @@ -55,7 +55,7 @@ _supported_fs btrfs
> _supported_os Linux
> _require_scratch
>
> -_scratch_mkfs |& _filter_mkfs
> +_scratch_mkfs >$seqres.full 2>&1
>
> _scratch_mount "-o thread_pool=6"
> _scratch_mount "-o remount,thread_pool=10"
>
> diff --git a/tests/generic/204 b/tests/generic/204
> index d6bb094..13069d8 100755
> --- a/tests/generic/204
> +++ b/tests/generic/204
> @@ -60,6 +60,7 @@ _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null \
> | _filter_mkfs 2> $tmp.mkfs > /dev/null
> _scratch_mount
>
> +# Source $tmp.mkfs to get geometry
> . $tmp.mkfs
>
> # fix the reserve block pool to a known size so that the enospc calculations
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Filipe David Manana,
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-28 12:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 17:28 [PATCH] fstests: fix _filter_mkfs regression on btrfs Eric Sandeen
2015-03-27 4:06 ` Eryu Guan
2015-03-27 20:44 ` [PATCH V2] " Eric Sandeen
2015-03-28 12:28 ` Filipe David Manana
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).