* [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check.
@ 2014-12-29 7:17 Qu Wenruo
2015-01-21 4:19 ` Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2014-12-29 7:17 UTC (permalink / raw)
To: linux-btrfs, fstests
Before the patch, we passed wrong value to _require_fs_space, which
should be in unit of 1024, but passed in unit of GB.
Fix it and add better prompt for falloc failure.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
tests/btrfs/079 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/btrfs/079 b/tests/btrfs/079
index 202d3e6..99d0187 100755
--- a/tests/btrfs/079
+++ b/tests/btrfs/079
@@ -73,8 +73,9 @@ rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_require_fs_space $SCRATCH_MNT $(($filesize / 1024 / 1024 / 1024))
-$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile
+_require_fs_space $SCRATCH_MNT $(($filesize / 1024))
+$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile || \
+ _fail "falloc failed"
dd_work() {
out=$1
--
2.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check.
2014-12-29 7:17 [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check Qu Wenruo
@ 2015-01-21 4:19 ` Dave Chinner
2015-01-21 4:21 ` Qu Wenruo
0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2015-01-21 4:19 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs, fstests
On Mon, Dec 29, 2014 at 03:17:18PM +0800, Qu Wenruo wrote:
> Before the patch, we passed wrong value to _require_fs_space, which
> should be in unit of 1024, but passed in unit of GB.
Yes, that needs fixing.
> Fix it and add better prompt for falloc failure.
That doesn't....
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
> tests/btrfs/079 | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/btrfs/079 b/tests/btrfs/079
> index 202d3e6..99d0187 100755
> --- a/tests/btrfs/079
> +++ b/tests/btrfs/079
> @@ -73,8 +73,9 @@ rm -f $seqres.full
>
> _scratch_mkfs >>$seqres.full 2>&1
> _scratch_mount
> -_require_fs_space $SCRATCH_MNT $(($filesize / 1024 / 1024 / 1024))
> -$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile
> +_require_fs_space $SCRATCH_MNT $(($filesize / 1024))
> +$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile || \
> + _fail "falloc failed"
If the falloc fails, then the golden output match will fail. Let the
test run, regardless, because the first thing it does is try to
overwrite the fallocated region where the success or failure of the
writes are completely ignored. Hence a falloc failure should also be
ignored...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check.
2015-01-21 4:19 ` Dave Chinner
@ 2015-01-21 4:21 ` Qu Wenruo
0 siblings, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2015-01-21 4:21 UTC (permalink / raw)
To: Dave Chinner; +Cc: linux-btrfs, fstests
-------- Original Message --------
Subject: Re: [PATCH] fstests: btrfs/079: Fix wrong value passed to
available space check.
From: Dave Chinner <david@fromorbit.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2015年01月21日 12:19
> On Mon, Dec 29, 2014 at 03:17:18PM +0800, Qu Wenruo wrote:
>> Before the patch, we passed wrong value to _require_fs_space, which
>> should be in unit of 1024, but passed in unit of GB.
> Yes, that needs fixing.
>
>> Fix it and add better prompt for falloc failure.
> That doesn't....
>
>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>> ---
>> tests/btrfs/079 | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/btrfs/079 b/tests/btrfs/079
>> index 202d3e6..99d0187 100755
>> --- a/tests/btrfs/079
>> +++ b/tests/btrfs/079
>> @@ -73,8 +73,9 @@ rm -f $seqres.full
>>
>> _scratch_mkfs >>$seqres.full 2>&1
>> _scratch_mount
>> -_require_fs_space $SCRATCH_MNT $(($filesize / 1024 / 1024 / 1024))
>> -$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile
>> +_require_fs_space $SCRATCH_MNT $(($filesize / 1024))
>> +$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile || \
>> + _fail "falloc failed"
> If the falloc fails, then the golden output match will fail. Let the
> test run, regardless, because the first thing it does is try to
> overwrite the fallocated region where the success or failure of the
> writes are completely ignored. Hence a falloc failure should also be
> ignored...
>
> Cheers,
>
> Dave.
OK, I'll send a V2 one for this.
Thanks for reviewing.
Qu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-21 4:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-29 7:17 [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check Qu Wenruo
2015-01-21 4:19 ` Dave Chinner
2015-01-21 4:21 ` Qu Wenruo
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).