[LTP] [PATCH v4] Refactoring dio_append.c using LTP API

Cyril Hrubis chrubis@suse.cz
Wed Dec 15 14:11:35 CET 2021


Hi!
Pushed with two minor changes, thanks.

> +/*\
> + * [Description]
>   *
> - */
> -/*
>   * dio_append - append zeroed data to a file using O_DIRECT while
>   *	a 2nd process is doing buffered reads and check if the buffer
>   *	reads always see zero.
>   */

I did rewrite this description to be a bit better.

> +static struct tst_test test = {
> +	.test_all = run,
> +	.setup = setup,
> +	.cleanup = cleanup,
> +	.needs_tmpdir = 1,
> +	.forks_child = 1,
> +	.options = (struct tst_option[]) {
> +		{"n:", &str_numchildren, "Number of threads (default 1000)"},
> +		{"w:", &str_writesize, "Write size for each append (default 64K)"},
> +		{"c:", &str_appends, "Number of appends (default 1000)"},

And fixed these descriptions. The description for n: didn't match it at
all. For the rest I've added the switch to the string description as
well, as currently the test library is dumb and just prints the string
as it is.


It would be better to fix the library to print the swich automatically
and then fix all the tests not to include the switches in the string
description. And ideally we would pass a default value in this structure
as well...

But for now the message should include the switches otherwise it's
incomprehensible to the user.

> +		{}
> +	},
> +};

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list