qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 0/2] block: Reject negative values for throttling options
@ 2016-01-20  4:21 Fam Zheng
  2016-01-20  4:21 ` [Qemu-devel] [PATCH v5 1/2] blockdev: Error out on negative throttling option values Fam Zheng
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Fam Zheng @ 2016-01-20  4:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, berto, qemu-block, Markus Armbruster, mreitz

v5: Add valid value testing in iotests. [Berto]
    Add details in commit message. [Markus]
    Use "%lld" in format string. [Markus]
    Fix ")" -> "]" in error message. [Kevin]

Now the negative values are silently converted to a huge positive number
because we are doing implicit casting from uint64_t to double. Fix it and add a
test case (this was once fixed in 7d81c1413c9 but regressed when the block
device option parsing code was changed).


Fam Zheng (2):
  blockdev: Error out on negative throttling option values
  iotests: Test that throttle values ranges

 blockdev.c                    |  3 ++-
 include/qemu/throttle.h       |  2 ++
 tests/qemu-iotests/051        | 18 ++++++++++++++++++
 tests/qemu-iotests/051.out    | 39 +++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/051.pc.out | 39 +++++++++++++++++++++++++++++++++++++++
 util/throttle.c               | 16 ++++++----------
 6 files changed, 106 insertions(+), 11 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-20 12:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20  4:21 [Qemu-devel] [PATCH v5 0/2] block: Reject negative values for throttling options Fam Zheng
2016-01-20  4:21 ` [Qemu-devel] [PATCH v5 1/2] blockdev: Error out on negative throttling option values Fam Zheng
2016-01-20  4:21 ` [Qemu-devel] [PATCH v5 2/2] iotests: Test that throttle values ranges Fam Zheng
2016-01-20  7:25 ` [Qemu-devel] [PATCH v5 0/2] block: Reject negative values for throttling options Markus Armbruster
2016-01-20  7:39   ` Fam Zheng
2016-01-20  8:07 ` Alberto Garcia
2016-01-20 12:38 ` Kevin Wolf

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).