[LTP] [PATCH v1] Fix dio_append/aiodio_append tests
Cyril Hrubis
chrubis@suse.cz
Tue Jan 30 13:09:55 CET 2024
Hi!
> diff --git a/testcases/kernel/io/ltp-aiodio/dio_append.c b/testcases/kernel/io/ltp-aiodio/dio_append.c
> index 057ae73d9..bd48a8252 100644
> --- a/testcases/kernel/io/ltp-aiodio/dio_append.c
> +++ b/testcases/kernel/io/ltp-aiodio/dio_append.c
> @@ -33,7 +33,7 @@ static void setup(void)
> {
> 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.
> if (tst_parse_int(str_numchildren, &numchildren, 1, INT_MAX))
> tst_brk(TBROK, "Invalid number of children '%s'", str_numchildren);
> @@ -97,7 +97,7 @@ static struct tst_test test = {
> .options = (struct tst_option[]) {
> {"n:", &str_numchildren, "Number of processes (default 16)"},
> {"w:", &str_writesize, "Write size for each append (default 64K)"},
> - {"c:", &str_appends, "Number of appends (default 1000)"},
> + {"c:", &str_appends, "Number of appends (default 10000)"},
> {}
> },
> .skip_filesystems = (const char *[]) {
> --
> 2.35.3
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list