[LTP] [PATCH v1] Fix dio_append/aiodio_append tests
Cyril Hrubis
chrubis@suse.cz
Tue Jan 30 13:18:09 CET 2024
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
More information about the ltp
mailing list