linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: guaneryu@gmail.com, linux-xfs@vger.kernel.org,
	fstests@vger.kernel.org, guan@eryu.me
Subject: Re: [PATCH 1/3] generic/092: skip test if file allocation unit isn't aligned
Date: Wed, 28 Sep 2022 18:04:51 +0800	[thread overview]
Message-ID: <20220928100451.n3fodsvfdnrffkjn@zlang-mailbox> (raw)
In-Reply-To: <166433903671.2008389.15875549373880546579.stgit@magnolia>

On Tue, Sep 27, 2022 at 09:23:56PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test exercises allocation behavior when truncating a preallocated
> file down to 5M and then up to 7M.  If those two sizes aren't aligned
> with the file allocation unit length, then the FIEMAP output will show
> blocks beyond EOF.  That will cause trouble with the golden output, so
> skip this test if that will be the case.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  tests/generic/092 |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 
> diff --git a/tests/generic/092 b/tests/generic/092
> index 505e0ec84f..d7c93ca792 100755
> --- a/tests/generic/092
> +++ b/tests/generic/092
> @@ -28,6 +28,12 @@ _require_test
>  _require_xfs_io_command "falloc"
>  _require_xfs_io_command "fiemap"
>  
> +# If the truncation sizes (5M/7M) aren't aligned with the file allocation unit
> +# length, then the FIEMAP output will show blocks beyond EOF.  That will cause
> +# trouble with the golden output, so skip this test if that will be the case.
> +_require_congruent_file_oplen $TEST_DIR $((5 * 1048576))
> +_require_congruent_file_oplen $TEST_DIR $((7 * 1048576))

Make sense to me,

Reviewed-by: Zorro Lang <zlang@redhat.com>

> +
>  # First test to make sure that truncating at i_size trims the preallocated bit
>  # past i_size
>  $XFS_IO_PROG -f -c "falloc -k 0 10M" -c "pwrite 0 5M" -c "truncate 5M"\
> 


  reply	other threads:[~2022-09-28 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  4:23 [PATCHSET v23.1 0/3] fstests: random fixes for v2022.09.25 Darrick J. Wong
2022-09-28  4:23 ` [PATCH 1/3] generic/092: skip test if file allocation unit isn't aligned Darrick J. Wong
2022-09-28 10:04   ` Zorro Lang [this message]
2022-09-28  4:24 ` [PATCH 2/3] xfs/114: fix missing reflink requires Darrick J. Wong
2022-09-28 10:06   ` Zorro Lang
2022-09-28  4:24 ` [PATCH 3/3] xfs/229: do not _xfs_force_bdev on TEST_DIR Darrick J. Wong
2022-09-28 10:12   ` Zorro Lang

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=20220928100451.n3fodsvfdnrffkjn@zlang-mailbox \
    --to=zlang@redhat.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.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;
as well as URLs for NNTP newsgroup(s).