[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/12] tests: avoid coroutine pool test crash
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 01/12] tests: avoid coroutine pool test crash |
Date: |
Tue, 7 Jun 2016 15:26:14 +0100 |
Skip the test_co_queue test case if the coroutine pool is not enabled.
The test case does not work without the pool because it touches memory
belonging to a freed coroutine (on purpose).
Reported-by: Eduardo Habkost <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Message-id: address@hidden
---
tests/test-coroutine.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c
index dd4ced9..ea7f87f 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);
--
2.5.5
- [Qemu-devel] [PULL 00/12] Block patches, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 03/12] blockdev-backup: Don't move target AioContext if it's attached, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 01/12] tests: avoid coroutine pool test crash,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 02/12] blockdev-backup: Use bdrv_lookup_bs on target, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 04/12] virtio-blk: Remove op blocker for dataplane, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 05/12] virtio-scsi: Remove op blocker for dataplane, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 07/12] block/io: Remove unused bdrv_aio_write_zeroes(), Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 08/12] iostatus: fix comments for block_job_iostatus_reset, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 06/12] virtio: drop duplicate virtio_queue_get_id() function, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 11/12] block: Drop bdrv_ioctl_bh_cb, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 09/12] block/io: optimize bdrv_co_pwritev for small requests, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 10/12] block: Move BlockRequest type to io.c, Stefan Hajnoczi, 2016/06/07
- [Qemu-devel] [PULL 12/12] throttle: refuse iops-size without iops-total/read/write, Stefan Hajnoczi, 2016/06/07