From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Add documentation for tst_parse_* helpers functions
Date: Tue, 7 Dec 2021 19:56:27 +0100 [thread overview]
Message-ID: <Ya+uW7R+djvFWsX/@yuki> (raw)
In-Reply-To: <20211207133515.24053-1-andrea.cervesato@suse.com>
Hi!
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> doc/c-test-api.txt | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
> index 64d0630ce..b03124ed3 100644
> --- a/doc/c-test-api.txt
> +++ b/doc/c-test-api.txt
> @@ -457,15 +457,17 @@ NOTE: The test parameters must not collide with common test parameters defined
> [source,c]
> -------------------------------------------------------------------------------
> int tst_parse_int(const char *str, int *val, int min, int max);
> +int tst_parse_long(const char *str, long *val, long min, long max);
> int tst_parse_float(const char *str, float *val, float min, float max);
> +int tst_parse_filesize(const char *str, long long *val, long long min, long long max);
> -------------------------------------------------------------------------------
>
> Helpers for parsing the strings returned in the 'struct tst_option'.
>
> -Both return zero on success and 'errno', mostly 'EINVAL' or 'ERANGE', on
> +Helpers return zero on success and 'errno', mostly 'EINVAL' or 'ERANGE', on
> failure.
>
> -Both functions are no-op if 'str' is 'NULL'.
> +Helpers functions are no-op if 'str' is 'NULL'.
>
> The valid range for result includes both 'min' and 'max'.
Maybe we should list what are the valid units for the tst_parse_filesize
here as well, otherwise it looks good.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2021-12-07 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 13:35 [LTP] [PATCH v1] Add documentation for tst_parse_* helpers functions Andrea Cervesato via ltp
2021-12-07 18:56 ` 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=Ya+uW7R+djvFWsX/@yuki \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.com \
--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