Re: [PATCH v2 09/19] test-cutils: Add coverage of qemu_strtod

2023-05-22 Thread Eric Blake
On Mon, May 22, 2023 at 12:56:31PM +0200, Hanna Czenczek wrote: > > > > +static void test_qemu_strtod_erange_junk(void) > > > > +{ > > > > +const char *str; > > > > +const char *endptr; > > > > +int err; > > > > +double res; > > > > + > > > > +/* EINVAL has priority over ERANGE

Re: [PATCH v2 09/19] test-cutils: Add coverage of qemu_strtod

2023-05-22 Thread Hanna Czenczek
On 19.05.23 19:52, Eric Blake wrote: On Fri, May 19, 2023 at 05:05:20PM +0200, Hanna Czenczek wrote: On 12.05.23 04:10, Eric Blake wrote: It's hard to tweak code for consistency if I can't prove what will or won't break from those tweaks. Time to add unit tests for qemu_strtod() and qemu_strto

Re: [PATCH v2 09/19] test-cutils: Add coverage of qemu_strtod

2023-05-19 Thread Eric Blake
On Fri, May 19, 2023 at 05:05:20PM +0200, Hanna Czenczek wrote: > On 12.05.23 04:10, Eric Blake wrote: > > It's hard to tweak code for consistency if I can't prove what will or > > won't break from those tweaks. Time to add unit tests for > > qemu_strtod() and qemu_strtod_finite(). > > > > Among

Re: [PATCH v2 09/19] test-cutils: Add coverage of qemu_strtod

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: It's hard to tweak code for consistency if I can't prove what will or won't break from those tweaks. Time to add unit tests for qemu_strtod() and qemu_strtod_finite(). Among other things, I wrote a check whether we have C99 semantics for strtod("0x1") (which

[PATCH v2 09/19] test-cutils: Add coverage of qemu_strtod

2023-05-11 Thread Eric Blake
It's hard to tweak code for consistency if I can't prove what will or won't break from those tweaks. Time to add unit tests for qemu_strtod() and qemu_strtod_finite(). Among other things, I wrote a check whether we have C99 semantics for strtod("0x1") (which MUST parse hex numbers) rather than C8