All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] block: Reject negative values for throttling options
@ 2016-01-11  5:42 Fam Zheng
  2016-01-11  5:42 ` [Qemu-devel] [PATCH 1/2] blockdev: Error out on negative throttling option values Fam Zheng
  2016-01-11  5:42 ` [Qemu-devel] [PATCH 2/2] iotests: Test that negative throttle values are rejected Fam Zheng
  0 siblings, 2 replies; 5+ messages in thread
From: Fam Zheng @ 2016-01-11  5:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Markus Armbruster, qemu-block

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 negative throttle values are rejected

 blockdev.c                    | 26 +++++++++++++-------------
 tests/qemu-iotests/051        | 11 +++++++++++
 tests/qemu-iotests/051.out    | 21 +++++++++++++++++++++
 tests/qemu-iotests/051.pc.out | 21 +++++++++++++++++++++
 4 files changed, 66 insertions(+), 13 deletions(-)

-- 
2.4.3

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

end of thread, other threads:[~2016-01-13  0:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11  5:42 [Qemu-devel] [PATCH 0/2] block: Reject negative values for throttling options Fam Zheng
2016-01-11  5:42 ` [Qemu-devel] [PATCH 1/2] blockdev: Error out on negative throttling option values Fam Zheng
2016-01-12 15:00   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-13  0:29     ` Fam Zheng
2016-01-11  5:42 ` [Qemu-devel] [PATCH 2/2] iotests: Test that negative throttle values are rejected Fam Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.