public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Dave Chinner <david@fromorbit.com>
Cc: guaneryu@gmail.com, fstests@vger.kernel.org, chao@kernel.org
Subject: Re: [PATCH v3] generic/508: fix to check inode creation time feature on scratch mountpoint
Date: Mon, 29 Oct 2018 18:34:34 +0800	[thread overview]
Message-ID: <a519cbed-3f03-8023-01ad-0b7416638e69@huawei.com> (raw)
In-Reply-To: <20181027032801.GH6311@dastard>

On 2018/10/27 11:28, Dave Chinner wrote:
> On Sat, Oct 27, 2018 at 09:55:20AM +0800, Chao Yu wrote:
>> _require_btime() just check inode creation time feature on TEST_DIR
>> mountpoint, but generic/508 needs to do that check on SCRATCH_MNT
>> mountpoint. Let's add _require_scratch_btime() for that, meanwhile
>> handling scratch_{mkfs,mount,umount} inside the function to decouple
>> with caller.
>>
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>> v3:
>> - hanlde scratch mkfs/mount/umount inside _require_scratch_btime
>> - relocate _require_scratch_btime
>>  common/rc         | 14 ++++++++++++++
>>  tests/generic/508 |  2 +-
>>  2 files changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/rc b/common/rc
>> index b4987a9cd7f7..a882fada7d02 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -3851,6 +3851,20 @@ _require_btime()
>>  	rm -f $TEST_DIR/test_creation_time
>>  }
>>  
>> +_require_scratch_btime()
>> +{
>> +	_require_scratch
>> +	_scratch_mkfs > /dev/null 2>&1
>> +	_scratch_mount
>> +
>> +	$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 $SCRATCH_MNT/test_creation_time
> 
> No need to remove that file - it's going to get mkfs'd again,
> anyway.

That's correct, I just saw Eryu has fixed this in upstream, so I think I
don't need to send v4...

> 
> Otherwise looks fine. I'm not a fan of all these require_scratch
> rules having to run mkfs, but I can live with it.
> 
> Reviewed-by: Dave Chinner <dchinner@redhat.com>

Thanks for the review. :)

Thanks,

> 

      reply	other threads:[~2018-10-29 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27  1:55 [PATCH v3] generic/508: fix to check inode creation time feature on scratch mountpoint Chao Yu
2018-10-27  3:28 ` Dave Chinner
2018-10-29 10:34   ` Chao Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a519cbed-3f03-8023-01ad-0b7416638e69@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=chao@kernel.org \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox