aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-07 15:59:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-07 15:59:28 +0100
commit40eeb397c8b8008aa13bca3a8cb25d152eb5ab44 (patch)
treedf56d2c82e9a30cd6db98ad0d480ea27c959cc9a /tests
parent79cecb3520606c55f427752c0a7a4add8afe2413 (diff)
parent8860eabdee32f78d9a34273a340b8f74476bc9a0 (diff)
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Tue 07 Jun 2016 15:26:09 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: throttle: refuse iops-size without iops-total/read/write block: Drop bdrv_ioctl_bh_cb block: Move BlockRequest type to io.c block/io: optimize bdrv_co_pwritev for small requests iostatus: fix comments for block_job_iostatus_reset block/io: Remove unused bdrv_aio_write_zeroes() virtio: drop duplicate virtio_queue_get_id() function virtio-scsi: Remove op blocker for dataplane virtio-blk: Remove op blocker for dataplane blockdev-backup: Don't move target AioContext if it's attached blockdev-backup: Use bdrv_lookup_bs on target tests: avoid coroutine pool test crash Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/07712
-rw-r--r--tests/qemu-iotests/077.out26
-rw-r--r--tests/test-coroutine.c10
-rw-r--r--tests/test-throttle.c10
4 files changed, 20 insertions, 38 deletions
diff --git a/tests/qemu-iotests/077 b/tests/qemu-iotests/077
index 4dc680b7fc..d2d2a2d687 100755
--- a/tests/qemu-iotests/077
+++ b/tests/qemu-iotests/077
@@ -60,7 +60,7 @@ EOF
# Sequential RMW requests on the same physical sector
off=0x1000
-for ev in "head" "after_head" "tail" "after_tail"; do
+for ev in "head" "after_head"; do
cat <<EOF
break pwritev_rmw_$ev A
aio_write -P 10 $((off + 0x200)) 0x200
@@ -211,16 +211,6 @@ function verify_io()
echo read -P 11 0x2400 0x200
echo read -P 0 0x2600 0xa00
- echo read -P 0 0x3000 0x200
- echo read -P 10 0x3200 0x200
- echo read -P 11 0x3400 0x200
- echo read -P 0 0x3600 0xa00
-
- echo read -P 0 0x4000 0x200
- echo read -P 10 0x4200 0x200
- echo read -P 11 0x4400 0x200
- echo read -P 0 0x4600 0xa00
-
# Chained dependencies
echo read -P 10 0x5000 0x200
echo read -P 11 0x5200 0x200
diff --git a/tests/qemu-iotests/077.out b/tests/qemu-iotests/077.out
index eab14ae2e1..16f951fd3d 100644
--- a/tests/qemu-iotests/077.out
+++ b/tests/qemu-iotests/077.out
@@ -19,16 +19,6 @@ wrote XXX/XXX bytes at offset XXX
XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote XXX/XXX bytes at offset XXX
XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-blkdebug: Resuming request 'A'
-wrote XXX/XXX bytes at offset XXX
-XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote XXX/XXX bytes at offset XXX
-XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-blkdebug: Resuming request 'A'
-wrote XXX/XXX bytes at offset XXX
-XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote XXX/XXX bytes at offset XXX
-XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote XXX/XXX bytes at offset XXX
XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote XXX/XXX bytes at offset XXX
@@ -114,22 +104,6 @@ read 512/512 bytes at offset 9216
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 2560/2560 bytes at offset 9728
2.500 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 512/512 bytes at offset 12288
-512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 512/512 bytes at offset 12800
-512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 512/512 bytes at offset 13312
-512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 2560/2560 bytes at offset 13824
-2.500 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 512/512 bytes at offset 16384
-512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 512/512 bytes at offset 16896
-512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 512/512 bytes at offset 17408
-512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 2560/2560 bytes at offset 17920
-2.500 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 512/512 bytes at offset 20480
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 512/512 bytes at offset 20992
diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c
index dd4ced946c..ea7f87f487 100644
--- a/tests/test-coroutine.c
+++ b/tests/test-coroutine.c
@@ -369,7 +369,15 @@ static void perf_cost(void)
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
- g_test_add_func("/basic/co_queue", test_co_queue);
+
+ /* This test assumes there is a freelist and marks freed coroutine memory
+ * with a sentinel value. If there is no freelist this would legitimately
+ * crash, so skip it.
+ */
+ if (CONFIG_COROUTINE_POOL) {
+ g_test_add_func("/basic/co_queue", test_co_queue);
+ }
+
g_test_add_func("/basic/lifecycle", test_lifecycle);
g_test_add_func("/basic/yield", test_yield);
g_test_add_func("/basic/nesting", test_nesting);
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index c02be805f7..d584870950 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -398,6 +398,14 @@ static void test_max_is_missing_limit(void)
}
}
+static void test_iops_size_is_missing_limit(void)
+{
+ /* A total/read/write iops limit is required */
+ throttle_config_init(&cfg);
+ cfg.op_size = 4096;
+ g_assert(!throttle_is_valid(&cfg, NULL));
+}
+
static void test_have_timer(void)
{
/* zero structures */
@@ -653,6 +661,8 @@ int main(int argc, char **argv)
g_test_add_func("/throttle/config/conflicting", test_conflicting_config);
g_test_add_func("/throttle/config/is_valid", test_is_valid);
g_test_add_func("/throttle/config/max", test_max_is_missing_limit);
+ g_test_add_func("/throttle/config/iops_size",
+ test_iops_size_is_missing_limit);
g_test_add_func("/throttle/config_functions", test_config_functions);
g_test_add_func("/throttle/accounting", test_accounting);
g_test_add_func("/throttle/groups", test_groups);