qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 00/43] First batch of misc changes for 2.5 (2015-


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 00/43] First batch of misc changes for 2.5 (2015-09-09)
Date: Wed, 9 Sep 2015 15:25:01 -0400 (EDT)

I will add a patch to detect the invalid sequences, as the OS X behavior seems preferable. Something like returning -EINVAL if result == 0 && (endptr == p || endptr[-1] != '0'). Nice to have the testcases.

And I thought I had tested this pull request really a lot. :-)

Paolo


-----Original Message-----
From: Peter Maydell address@hidden
Received: mercoledì, 09 set 2015, 20:42
To: Paolo Bonzini address@hidden
CC: QEMU Developers address@hidden
Subject: Re: [Qemu-devel] [PULL 00/43] First batch of misc changes for 2.5 (2015-09-09)


On 9 September 2015 at 14:49, Paolo Bonzini <address@hidden> wrote:
> The following changes since commit 090d0bfd948343d522cd20bc634105b5cfe2483b:
>
>   s390: fix softmmu compilation (2015-08-28 16:05:24 +0100)
>
> are available in the git repository at:
>
>   git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 9fd1a94888cd6a559f95c3596ec1ac28b74838c1:
>
>   cpu-exec: fix lock hierarchy for user-mode emulation (2015-09-09 15:34:56 +0200)
>
> ----------------------------------------------------------------
> * Support for jemalloc
> * qemu_mutex_lock_iothread "No such process" fix
> * cutils: qemu_strto* wrappers
> * iohandler.c simplification
> * Many other fixes and misc patches.
>
> And some MTTCG work (with Emilio's fixes squashed):
> * Signal-free TCG kick
> * Removing spinlock in favor of QemuMutex
> * User-mode emulation multi-threading fixes/docs
>
> ----------------------------------------------------------------

Hi. I'm afraid 'make check' fails on OSX:

GTESTER tests/test-cutils
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:267:void
test_qemu_strtol_empty(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02Sab816860e6f76841220ea943985e84ad
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:282:void
test_qemu_strtol_whitespace(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02Sf54276ef91a62d445403b86533fd5107
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:297:void
test_qemu_strtol_invalid(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02Sc7bdef393984a4b2f2d4e4f27abeb15d
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:481:void
test_qemu_strtol_full_empty(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02S4997e0b4ab30ebccffa73bc1781328b2
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:558:void
test_qemu_strtoul_empty(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02S698648c46f24ad5a964b9d17af6bc4e8
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:573:void
test_qemu_strtoul_whitespace(): assertion failed (err == 0): (-22 ==
0)
GTester: last random seed: R02S1104b6fe236e206ba8fcf92362809c51
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:588:void
test_qemu_strtoul_invalid(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02S174ff5853966067468f62d748943c2b7
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:768:void
test_qemu_strtoul_full_empty(): assertion failed (err == 0): (-22 ==
0)
GTester: last random seed: R02S3ce87fc2cc5682c83e1e1d52621b4da5
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:843:void
test_qemu_strtoll_empty(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02S63bf7c10814c2a2bd2d17434e0aa02cf
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:858:void
test_qemu_strtoll_whitespace(): assertion failed (err == 0): (-22 ==
0)
GTester: last random seed: R02S99d2c928c55415df4469f03edce5f1b3
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:873:void
test_qemu_strtoll_invalid(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02S6c849584fb36a603f2261d0c215691bc
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:1053:void
test_qemu_strtoll_full_empty(): assertion failed (err == 0): (-22 ==
0)
GTester: last random seed: R02S8685bb488d3e6869e053fe9bbf7e99d0
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:1131:void
test_qemu_strtoull_empty(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02Sd7cef3a007a563c9ffa77f7ed3a60ab6
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:1146:void
test_qemu_strtoull_whitespace(): assertion failed (err == 0): (-22 ==
0)
GTester: last random seed: R02Sad8be510623b0ddc095987c6bd300454
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:1161:void
test_qemu_strtoull_invalid(): assertion failed (err == 0): (-22 == 0)
GTester: last random seed: R02Sc012647d52c18c0917f45222650e10b0
**
ERROR:/Users/pm215/src/qemu/tests/test-cutils.c:1341:void
test_qemu_strtoull_full_empty(): assertion failed (err == 0): (-22 ==
0)
GTester: last random seed: R02Scf2405f86a11f03b0ec039a0af727ebd
make: *** [check-tests/test-cutils] Error 1

(errno 22 on OSX is EINVAL.)

These tests appear to be testing the behaviour of the system
strtol on invalid sequences (for instance the first one is
using the empty string ""). POSIX says
http://pubs.opengroup.org/onlinepubs/9699919799/functions/strtol.html
"If the subject sequence is empty or does not have the expected
form, no conversion is performed; the value of str shall be
stored in the object pointed to by endptr, provided that endptr
is not a null pointer."
and later
"These functions may fail if:
 [EINVAL]   No conversion could be performed."

That is, it's implementation defined whether this kind of
failing conversion sets errno to EINVAL or leaves it alone,
and it looks like the test cases are assuming the latter
behaviour. I imagine they won't work on the BSDs either,
though I haven't tested.

thanks
-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]