public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Nirjhar Roy <nirjhar@linux.ibm.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-xfs@vger.kernel.org, ritesh.list@gmail.com,
	ojaswin@linux.ibm.com, zlang@kernel.org
Subject: Re: [PATCH v4 2/3] common/rc: Add a new _require_scratch_extsize helper function
Date: Wed, 27 Nov 2024 09:40:32 +0530	[thread overview]
Message-ID: <9b6c5616-580a-491d-a5b9-aa0344e7db12@linux.ibm.com> (raw)
In-Reply-To: <20241127005403.GS9438@frogsfrogsfrogs>


On 11/27/24 06:24, Darrick J. Wong wrote:
> On Tue, Nov 26, 2024 at 11:24:07AM +0530, Nirjhar Roy wrote:
>> _require_scratch_extsize helper function will be used in the
>> the next patch to make the test run only on filesystems with
>> extsize support.
>>
>> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
>> Signed-off-by: Nirjhar Roy <nirjhar@linux.ibm.com>
> Looks good to me now,
> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
>
> --D

Thank you.

--NR

>
>> ---
>>   common/rc | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/common/rc b/common/rc
>> index f94bee5e..e6c6047d 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -48,6 +48,23 @@ _test_fsxattr_xflag()
>>   	grep -q "fsxattr.xflags.*\[.*$2.*\]" <($XFS_IO_PROG -c "stat -v" "$1")
>>   }
>>   
>> +# This test requires extsize support on the  filesystem
>> +_require_scratch_extsize()
>> +{
>> +	_require_scratch
>> +	_require_xfs_io_command "extsize"
>> +	_scratch_mkfs > /dev/null
>> +	_scratch_mount
>> +	local filename=$SCRATCH_MNT/$RANDOM
>> +	local blksz=$(_get_block_size $SCRATCH_MNT)
>> +	local extsz=$(( blksz*2 ))
>> +	local res=$($XFS_IO_PROG -c "open -f $filename" -c "extsize $extsz" \
>> +		-c "extsize")
>> +	_scratch_unmount
>> +	grep -q "\[$extsz\] $filename" <(echo $res) || \
>> +		_notrun "this test requires extsize support on the filesystem"
>> +}
>> +
>>   # Write a byte into a range of a file
>>   _pwrite_byte() {
>>   	local pattern="$1"
>> -- 
>> 2.43.5
>>
>>
-- 
---
Nirjhar Roy
Linux Kernel Developer
IBM, Bangalore


  reply	other threads:[~2024-11-27  4:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26  5:54 [PATCH v4 0/3] Addition of new tests for extsize hints Nirjhar Roy
2024-11-26  5:54 ` [PATCH v4 1/3] common/rc,xfs/207: Add a common helper function to check xflag bits Nirjhar Roy
2024-11-26  6:27   ` Christoph Hellwig
2024-11-27  4:09     ` Nirjhar Roy
2024-11-26  5:54 ` [PATCH v4 2/3] common/rc: Add a new _require_scratch_extsize helper function Nirjhar Roy
2024-11-26  6:27   ` Christoph Hellwig
2024-11-27  4:10     ` Nirjhar Roy
2024-11-27  0:54   ` Darrick J. Wong
2024-11-27  4:10     ` Nirjhar Roy [this message]
2024-11-26  5:54 ` [PATCH v4 3/3] generic: Addition of new tests for extsize hints Nirjhar Roy
2024-11-26  6:28   ` Christoph Hellwig
2024-11-27  4:10     ` Nirjhar Roy
2024-11-27  0:55   ` Darrick J. Wong
2024-11-27  4:11     ` Nirjhar Roy

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=9b6c5616-580a-491d-a5b9-aa0344e7db12@linux.ibm.com \
    --to=nirjhar@linux.ibm.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=zlang@kernel.org \
    /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