From: Petr Vorel <pvorel@suse.cz>
To: "Bird, Tim" <Tim.Bird@sony.com>
Cc: Eric Sandeen <sandeen@redhat.com>, Jens Axboe <axboe@kernel.dk>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
Eric Sandeen <sandeen@sandeen.net>, Jan Kara <jack@suse.cz>,
"Darrick J. Wong" <djwong@kernel.org>,
Dave Chinner <david@fromorbit.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>,
"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] LTP test df01.sh detected different size of loop device in v5.19
Date: Fri, 19 Aug 2022 21:30:46 +0200 [thread overview]
Message-ID: <Yv/k5tblR0QLQT1q@pevik> (raw)
In-Reply-To: <BYAPR13MB25036BC8089554DABE287CC2FD6C9@BYAPR13MB2503.namprd13.prod.outlook.com>
> > -----Original Message-----
> > From: ltp <ltp-bounces+tim.bird=sony.com@lists.linux.it> On Behalf Of Petr Vorel
> > > On 8/18/22 12:01 PM, Petr Vorel wrote:
> > > >> On Thu, Aug 18, 2022 at 11:05:33AM -0500, Eric Sandeen wrote:
> > > >>> On 8/18/22 10:25 AM, Petr Vorel wrote:
> > > >>>> Hi Eric, all,
> > > >>> ...
> > > >>>>> IOWS, I think the test expects that free space is reflected in statfs numbers
> > > >>>>> immediately after a file is removed, and that's no longer the case here. They
> > > >>>>> change in between the df check and the statfs check.
> > > >>>>> (The test isn't just checking that the values are correct, it is checking that
> > > >>>>> the values are /immediately/ correct.)
> > > >>>>> Putting a "sleep 1" after the "rm -f" in the test seems to fix it; IIRC
> > > >>>>> the max time to wait for inodegc is 1s. This does slow the test down a bit.
> > > >>>> Sure, it looks like we can sleep just 50ms on my hw (although better might be to
> > > >>>> poll for the result [1]), I just wanted to make sure there is no bug/regression
> > > >>>> before hiding it with sleep.
> > > >>>> Thanks for your input!
> > > >>>> Kind regards,
> > > >>>> Petr
> > > >>>> [1] https://people.kernel.org/metan/why-sleep-is-almost-never-acceptable-in-tests
> > > >>>>> -Eric
> > > >>>> +++ testcases/commands/df/df01.sh
> > > >>>> @@ -63,6 +63,10 @@ df_test()
> > > >>>> tst_res TFAIL "'$cmd' failed."
> > > >>>> fi
> > > >>>> + if [ "$DF_FS_TYPE" = xfs ]; then
> > > >>>> + tst_sleep 50ms
> > > >>>> + fi
> > > >>>> +
> > > >>> Probably worth at least a comment as to why ...
> > > > Sure, that was just to document possible fix. BTW even 200ms was not reliable in
> > > > the long run => not a good solution.
> > > >>> Dave / Darrick / Brian - I'm not sure how long it might take to finish inodegc?
> > > >>> A too-short sleep will let the flakiness remain ...
> > > >> A fsfreeze -f / fsfreeze -u cycle will force all the background garbage
> > > >> collection to run to completion when precise free space accounting is
> > > >> being tested.
> > > > Thanks for a hint, do you mean to put it into df_test after creating file with
> > > > dd to wrap second df_verify (calls df) and df_check (runs stat and compare values)?
> > > > Because that does not help - it fails when running in the loop (managed to break after 5th run).
> > > I think it would go after you remove the file, to ensure that no space usage
> > > changes are pending when you check.
> > > <tests>
> > > This seems to work fine (pseudopatch):
> > > ROD_SILENT rm -rf mntpoint/testimg
> > > + # Ensure free space change can be seen by statfs
> > > + fsfreeze -f $TST_MNTPOINT
> > > + fsfreeze -u $TST_MNTPOINT
> > It looks like it works. We might add small binary which just calls these 2
> > ioctl (FIFREEZE and FITHAW), just to be friendly to people on embedded
> > environment with minimal dependencies (yes, some people might not install
> > util-linux).
> Thank you!! It's good to know that small embedded systems are still
> considered, and the consideration is much appreciated! :-)
> Let me know if you'd like me to try writing the utility.
Thank you, Tim! I'll Cc you when sending this patch (likely next week).
You might also appreciate our effort to lower down loop device size (used for
all_filesystems): https://lore.kernel.org/ltp/Yv%2FkVXSK0xJGb3RO@pevik/
Kind regards,
Petr
> -- Tim
next prev parent reply other threads:[~2022-08-19 19:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 13:20 LTP test df01.sh detected different size of loop device in v5.19 Petr Vorel
2022-08-12 13:24 ` Petr Vorel
2022-08-12 14:00 ` Petr Vorel
2022-08-14 22:44 ` Dave Chinner
2022-08-15 9:31 ` Petr Vorel
2022-08-15 20:09 ` Eric Sandeen
2022-08-18 15:25 ` Petr Vorel
2022-08-18 16:05 ` Eric Sandeen
2022-08-18 16:27 ` Darrick J. Wong
2022-08-18 17:01 ` Petr Vorel
2022-08-18 21:19 ` Eric Sandeen
2022-08-19 16:00 ` Petr Vorel
2022-08-19 16:06 ` [LTP] " Bird, Tim
2022-08-19 19:30 ` Petr Vorel [this message]
2022-08-18 21:02 ` Dave Chinner
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=Yv/k5tblR0QLQT1q@pevik \
--to=pvorel@suse.cz \
--cc=Tim.Bird@sony.com \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hare@suse.de \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ltp@lists.linux.it \
--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;
as well as URLs for NNTP newsgroup(s).