diff mbox

xfstests,shared/032: fix fsck failure

Message ID 1412895285-10544-1-git-send-email-wangshilong1991@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang Shilong Oct. 9, 2014, 10:54 p.m. UTC
while running ./check tests/shared/032, it outputs something like:

FSTYP         -- btrfs
PLATFORM      -- Linux/x86_64 vm01 3.17.0-rc5+
MKFS_OPTIONS  -- /dev/sdc
MOUNT_OPTIONS -- /dev/sdc /mnt/scratch

shared/032 2s ... 2s
_check_btrfs_filesystem: filesystem on /dev/sdc is inconsistent (see /root/xfstests-dev/results//shared/032.full)
Ran: shared/032
Passed all 1 tests

This is because xfstests will run fsck after each unit test,
for tests/shared/032, we have reformated SCRATCH_DEV to other fs,
so to make fsck happy later, let's fomrat fs here.

Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
---
 tests/shared/032 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Eryu Guan Oct. 9, 2014, 3:58 p.m. UTC | #1
On Thu, Oct 09, 2014 at 06:54:45PM -0400, Wang Shilong wrote:
> while running ./check tests/shared/032, it outputs something like:
> 
> FSTYP         -- btrfs
> PLATFORM      -- Linux/x86_64 vm01 3.17.0-rc5+
> MKFS_OPTIONS  -- /dev/sdc
> MOUNT_OPTIONS -- /dev/sdc /mnt/scratch
> 
> shared/032 2s ... 2s
> _check_btrfs_filesystem: filesystem on /dev/sdc is inconsistent (see /root/xfstests-dev/results//shared/032.full)
> Ran: shared/032
> Passed all 1 tests
> 
> This is because xfstests will run fsck after each unit test,
> for tests/shared/032, we have reformated SCRATCH_DEV to other fs,
> so to make fsck happy later, let's fomrat fs here.
> 
> Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
> ---
>  tests/shared/032 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/shared/032 b/tests/shared/032
> index 7835e30..7a1a242 100755
> --- a/tests/shared/032
> +++ b/tests/shared/032
> @@ -91,6 +91,9 @@ do
>  	fi
>  done
>  
> +# make fsck happy later.
> +_scratch_mkfs > /dev/null 2>&1
> +

_require_scratch => _require_scratch_nocheck may be the right way to
go, just like 5d0153d does

5d0153d btrfs: use _nocheck for btrfs/011 and btrfs/012

Thanks,
Eryu
>  # success, all done
>  status=0
>  exit
> -- 
> 1.8.3.1
> 
> --
> 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 fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wang Shilong Oct. 9, 2014, 4:15 p.m. UTC | #2
On Thu, Oct 09, 2014 at 06:54:45PM -0400, Wang Shilong wrote:
>> while running ./check tests/shared/032, it outputs something like:
>> 
>> FSTYP         -- btrfs
>> PLATFORM      -- Linux/x86_64 vm01 3.17.0-rc5+
>> MKFS_OPTIONS  -- /dev/sdc
>> MOUNT_OPTIONS -- /dev/sdc /mnt/scratch
>> 
>> shared/032 2s ... 2s
>> _check_btrfs_filesystem: filesystem on /dev/sdc is inconsistent (see /root/xfstests-dev/results//shared/032.full)
>> Ran: shared/032
>> Passed all 1 tests
>> 
>> This is because xfstests will run fsck after each unit test,
>> for tests/shared/032, we have reformated SCRATCH_DEV to other fs,
>> so to make fsck happy later, let's fomrat fs here.
>> 
>> Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
>> ---
>> tests/shared/032 | 3 +++
>> 1 file changed, 3 insertions(+)
>> 
>> diff --git a/tests/shared/032 b/tests/shared/032
>> index 7835e30..7a1a242 100755
>> --- a/tests/shared/032
>> +++ b/tests/shared/032
>> @@ -91,6 +91,9 @@ do
>> 	fi
>> done
>> 
>> +# make fsck happy later.
>> +_scratch_mkfs > /dev/null 2>&1
>> +
> 
> _require_scratch => _require_scratch_nocheck may be the right way to
> go, just like 5d0153d does
> 
> 5d0153d btrfs: use _nocheck for btrfs/011 and btrfs/012

Yeah, that is better!^_^

Thanks!
Wang Shilong
> 
> Thanks,
> Eryu
>> # success, all done
>> status=0
>> exit
>> -- 
>> 1.8.3.1
>> 
>> --
>> 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

Best Regards,
Wang Shilong

--
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
diff mbox

Patch

diff --git a/tests/shared/032 b/tests/shared/032
index 7835e30..7a1a242 100755
--- a/tests/shared/032
+++ b/tests/shared/032
@@ -91,6 +91,9 @@  do
 	fi
 done
 
+# make fsck happy later.
+_scratch_mkfs > /dev/null 2>&1
+
 # success, all done
 status=0
 exit