All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common/rc: fix to check inode creation on scratch_mnt in _require_btime()
@ 2018-10-24  2:26 Chao Yu
  2018-10-24  4:45 ` Dave Chinner
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2018-10-24  2:26 UTC (permalink / raw)
  To: guaneryu; +Cc: fstests, chao, Chao Yu

_require_btime() should check inode creation feature on SCRATCH_MNT
mountpoint intead of TEST_DIR mountpoint, otherwise generic/508 will
fail due to incorrect check of this function.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 common/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/rc b/common/rc
index b4987a9cd7f7..5154241a5cee 100644
--- a/common/rc
+++ b/common/rc
@@ -3845,10 +3845,10 @@ _dmsetup_create()
 
 _require_btime()
 {
-	$XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -v" \
+	$XFS_IO_PROG -f $SCRATCH_MNT/test_creation_time -c "statx -v" \
 		| grep btime >>$seqres.full 2>&1 || \
 		_notrun "inode creation time not supported by this filesystem"
-	rm -f $TEST_DIR/test_creation_time
+	rm -f $SCRATCH_MNT/test_creation_time
 }
 
 init_rc
-- 
2.18.0.rc1

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

* Re: [PATCH] common/rc: fix to check inode creation on scratch_mnt in _require_btime()
  2018-10-24  2:26 [PATCH] common/rc: fix to check inode creation on scratch_mnt in _require_btime() Chao Yu
@ 2018-10-24  4:45 ` Dave Chinner
  2018-10-24  7:25   ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2018-10-24  4:45 UTC (permalink / raw)
  To: Chao Yu; +Cc: guaneryu, fstests, chao

On Wed, Oct 24, 2018 at 10:26:45AM +0800, Chao Yu wrote:
> _require_btime() should check inode creation feature on SCRATCH_MNT
> mountpoint intead of TEST_DIR mountpoint, otherwise generic/508 will
> fail due to incorrect check of this function.
> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
>  common/rc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index b4987a9cd7f7..5154241a5cee 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3845,10 +3845,10 @@ _dmsetup_create()
>  
>  _require_btime()
>  {
> -	$XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -v" \
> +	$XFS_IO_PROG -f $SCRATCH_MNT/test_creation_time -c "statx -v" \
>  		| grep btime >>$seqres.full 2>&1 || \
>  		_notrun "inode creation time not supported by this filesystem"
> -	rm -f $TEST_DIR/test_creation_time
> +	rm -f $SCRATCH_MNT/test_creation_time
>  }

This doesn't work. the scratch device is not mounted at the time
generic/508 calls it.

If you are going to check the scratch device, the function needs to
be called _require_scratch_btime and be called after
scratch_mkfs/scratch_mount has been run by the test.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

* Re: [PATCH] common/rc: fix to check inode creation on scratch_mnt in _require_btime()
  2018-10-24  4:45 ` Dave Chinner
@ 2018-10-24  7:25   ` Chao Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-10-24  7:25 UTC (permalink / raw)
  To: Dave Chinner; +Cc: guaneryu, fstests, chao

On 2018/10/24 12:45, Dave Chinner wrote:
> On Wed, Oct 24, 2018 at 10:26:45AM +0800, Chao Yu wrote:
>> _require_btime() should check inode creation feature on SCRATCH_MNT
>> mountpoint intead of TEST_DIR mountpoint, otherwise generic/508 will
>> fail due to incorrect check of this function.
>>
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>>  common/rc | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/common/rc b/common/rc
>> index b4987a9cd7f7..5154241a5cee 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -3845,10 +3845,10 @@ _dmsetup_create()
>>  
>>  _require_btime()
>>  {
>> -	$XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -v" \
>> +	$XFS_IO_PROG -f $SCRATCH_MNT/test_creation_time -c "statx -v" \
>>  		| grep btime >>$seqres.full 2>&1 || \
>>  		_notrun "inode creation time not supported by this filesystem"
>> -	rm -f $TEST_DIR/test_creation_time
>> +	rm -f $SCRATCH_MNT/test_creation_time
>>  }
> 
> This doesn't work. the scratch device is not mounted at the time
> generic/508 calls it.
> 
> If you are going to check the scratch device, the function needs to
> be called _require_scratch_btime and be called after
> scratch_mkfs/scratch_mount has been run by the test.
That's correct, I've fixed in v2, could you please help to check that?

Thanks,

> 
> Cheers,
> 
> Dave.
> 

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

end of thread, other threads:[~2018-10-24 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24  2:26 [PATCH] common/rc: fix to check inode creation on scratch_mnt in _require_btime() Chao Yu
2018-10-24  4:45 ` Dave Chinner
2018-10-24  7:25   ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.