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


Reply via email to