FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>,
	"fstests@vger.kernel.org" <fstests@vger.kernel.org>,
	Namjae Jeon <linkinjeon@kernel.org>
Subject: Re: [PATCH] generic: test zero-byte writes to new file
Date: Tue, 18 Feb 2025 09:39:50 -0800	[thread overview]
Message-ID: <20250218173950.GL21799@frogsfrogsfrogs> (raw)
In-Reply-To: <65457d9b-c435-40eb-9531-6fd23c48ae75@sandeen.net>

On Fri, Feb 14, 2025 at 08:36:25AM -0600, Eric Sandeen wrote:
> On 2/13/25 10:02 PM, Darrick J. Wong wrote:
> > On Thu, Feb 13, 2025 at 09:17:28PM -0600, Eric Sandeen wrote:
> >> On 2/13/25 2:50 PM, Eric Sandeen wrote:
> >>> On 2/13/25 1:51 PM, Darrick J. Wong wrote:
> >>
> >> ...
> >>
> >>>>> +rm -f $TEST_DIR/testfile.$seq
> >>>>> +$XFS_IO_PROG -f -c "pwrite 0 0" $TEST_DIR/testfile.$seq
> >>>>> +test -f $TEST_DIR/testfile.$seq || _fail "file not created"
> >>>>
> >>>> When does the file not get created?
> >>>
> >>> In some unknown error case? ;)
> >>> There's probably no reason for that test, though of course
> >>> it's still expected to pass.
> >>>
> >>> In the various discussions of the exfat bug scattered around
> >>> the internet people kept pointing out that "well, the file does
> >>> get created" so I probably had that on my mind.
> >>
> >> To put a finer point on it, because I can't tell for sure - are
> >> you asking me to take that test out?
> > 
> > Nah, I was just wondering if there was something about the buggy exfat
> > code that either prevented the file from being created, or if the bug
> > was that the empty file got deleted after the zero-byte pwrite and I
> > misunderstood what's going on.
> 
> Ah, I see. No, the observable problem was an -EFAULT on the write,
> and the file /does/ get created as expected. The test probably is
> extraneous to the original bug, because of course open(O_CREAT) and
> write(0) are two separate operations. I was just a bit over-eager
> when writing the test.

<nod> Would you mind resending, but with the rm removed?

--D

> Thanks,
> -Eric
> 
> > (IOWs I think this test is fine, but could the exfat maintainer
> > clarify?)
> > 
> > --D
> > 
> >> Thanks,
> >> -Eric
> >>
> >>
> > 
> 
> 

  reply	other threads:[~2025-02-18 17:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 18:06 [PATCH] generic: test zero-byte writes to new file Eric Sandeen
2025-02-13 19:51 ` Darrick J. Wong
2025-02-13 20:50   ` Eric Sandeen
2025-02-14  3:17     ` Eric Sandeen
2025-02-14  4:02       ` Darrick J. Wong
2025-02-14  5:46         ` Namjae Jeon
2025-02-14 14:36         ` Eric Sandeen
2025-02-18 17:39           ` Darrick J. Wong [this message]
2025-02-21 16:07             ` Eric Sandeen
2025-02-21  5:14 ` Nirjhar Roy (IBM)
2025-02-21 16:47   ` Darrick J. Wong
2025-02-24  4:39     ` Nirjhar Roy (IBM)
2025-02-25 22:29     ` Eric Sandeen
2025-02-26 10:57       ` 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=20250218173950.GL21799@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /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