aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/051
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-01-20 12:21:21 +0800
committerKevin Wolf <kwolf@redhat.com>2016-01-20 13:37:57 +0100
commite9b155501da2638e4e319af9960d35da1bc8662b (patch)
treec3943108408ce73df1ac960cd52f30fafefe827e /tests/qemu-iotests/051
parent972606c4db826f286f7f475551180502859f49b9 (diff)
downloadqemu-e9b155501da2638e4e319af9960d35da1bc8662b.zip
qemu-e9b155501da2638e4e319af9960d35da1bc8662b.tar.gz
qemu-e9b155501da2638e4e319af9960d35da1bc8662b.tar.bz2
iotests: Test that throttle values ranges
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/051')
-rwxr-xr-xtests/qemu-iotests/05118
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index d91f80b..7bfe9ff 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -263,6 +263,24 @@ run_qemu -drive file="$TEST_IMG",iops_size=1234,throttling.iops-size=5678
run_qemu -drive file="$TEST_IMG",readonly=on,read-only=off
echo
+echo === Catching negative/large throttling values ===
+echo
+
+run_qemu -drive file="$TEST_IMG",iops=-1
+run_qemu -drive file="$TEST_IMG",bps=-2
+run_qemu -drive file="$TEST_IMG",bps_rd=-3
+run_qemu -drive file="$TEST_IMG",bps_rd_max=-3
+run_qemu -drive file="$TEST_IMG",throttling.iops-total=-4
+run_qemu -drive file="$TEST_IMG",throttling.bps-total=-5
+# These are accepted
+run_qemu -drive file="$TEST_IMG",bps=0
+run_qemu -drive file="$TEST_IMG",bps=1
+run_qemu -drive file="$TEST_IMG",bps=1000000000000000
+# While these are not
+run_qemu -drive file="$TEST_IMG",bps=1000000000000001
+run_qemu -drive file="$TEST_IMG",bps=9999999999999999
+
+echo
echo === Parsing protocol from file name ===
echo