From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Fix dio_append/aiodio_append tests
Date: Tue, 30 Jan 2024 13:18:09 +0100 [thread overview]
Message-ID: <ZbjpATp6cK9AkvBm@yuki> (raw)
In-Reply-To: <ZbjnEzmW0RvxWhg9@yuki>
Hi!
> > numchildren = 16;
> > writesize = 64 * 1024;
> > - appends = 1000;
> > + appends = 10000;
>
> Since we are increasing this we should probably check the free space as
> well, so we should add something as:
>
> if (!tst_fs_has_free(".", appends, writesize))
> tst_brk(TCONF, "Not enough space to run the test");
>
> Or even better put a function:
>
> void tst_assert_free_space(const char *path, unsigned int size, unsigned int mult)
>
> into the test library and this function would tst_brk(TCONF, ) if there
> is not enough space and tst_res(TWARN, ) if the free space is let's say
> only 10% more than the test would need to run. And we can use that in
> all of these tests.
Also this can be done in a follow up patch. I guess that the cleanest
option would be to split the patch into two, one that fixes the race
condition, that one should go in ASAP. And second that raises the
appended file size followed by a patch to check for a free space.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-01-30 12:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 10:33 [LTP] [PATCH v1] Fix dio_append/aiodio_append tests Andrea Cervesato
2024-01-30 10:35 ` Andrea Cervesato via ltp
2024-01-30 12:09 ` Cyril Hrubis
2024-01-30 12:18 ` Cyril Hrubis [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=ZbjpATp6cK9AkvBm@yuki \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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