From: Thomas Huth <thuth@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, berrange@redhat.com
Subject: Re: [PATCH 1/2] utils: Tighter tests for qemu_strtosz
Date: Wed, 17 Mar 2021 15:59:54 +0100 [thread overview]
Message-ID: <5e1a096a-d0e6-a1c4-2a7d-64f28c79e0a7@redhat.com> (raw)
In-Reply-To: <20210317143325.2165821-2-eblake@redhat.com>
On 17/03/2021 15.33, Eric Blake wrote:
> Our tests were not validating the return value in all cases, nor was
> it guaranteeing our documented claim that 'res' is unchanged on error.
> For that matter, it wasn't as thorough as the existing tests for
> qemu_strtoi() and friends for proving that endptr and res are sanely
> set. Enhancing the test found one case where we violated our
> documentation: namely, when failing with EINVAL when endptr is NULL,
> we shouldn't modify res.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> tests/unit/test-cutils.c | 117 +++++++++++++++++++++++++++++++++++++--
> util/cutils.c | 4 +-
> 2 files changed, 114 insertions(+), 7 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2021-03-17 15:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 14:33 [PATCH 0/2] More qemu_strtosz fixes Eric Blake
2021-03-17 14:33 ` [PATCH 1/2] utils: Tighter tests for qemu_strtosz Eric Blake
2021-03-17 14:59 ` Thomas Huth [this message]
2021-03-17 14:33 ` [PATCH 2/2] utils: Work around mingw strto*l bug with 0x Eric Blake
2021-03-18 5:07 ` Thomas Huth
2021-03-17 15:15 ` [PATCH 0/2] More qemu_strtosz fixes no-reply
2021-03-17 15:28 ` Eric Blake
2021-03-19 17:58 ` Alex Bennée
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=5e1a096a-d0e6-a1c4-2a7d-64f28c79e0a7@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).