Skip to contentSkip to conversation

AioContext and thread pool unit tests

PATCH Applied Paolo Bonzini 2 participants 4 messages Nov 23, 2012 – Nov 26, 2012

lore
Share & tools
lore
#0 lore raw

cover AioContext and thread pool unit tests

As requested. :) The tests pass on both Linux and Wine.

I'm not sure if it makes sense to include these in 1.3, but the idea has some worth.

Paolo Bonzini (2):
tests: add AioContext unit tests
tests: add thread pool unit tests

 tests/Makefile           |   4 +
 tests/test-aio.c         | 667 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/test-thread-pool.c | 213 +++++++++++++++
 3 files changed, 884 insertions(+)
 create mode 100644 tests/test-aio.c
 create mode 100644 tests/test-thread-pool.c
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/2 tests: add AioContext unit tests

---
 tests/Makefile   |   2 +
 tests/test-aio.c | 667 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 669 insertions(+)
 create mode 100644 tests/test-aio.c
tests/Makefile +2 -0
index ca680e5..61cbe3b 100644
@@ -15,6 +15,7 @@ check-unit-y += tests/test-string-output-visitor$(EXESUF)
 check-unit-y += tests/test-coroutine$(EXESUF)
 check-unit-y += tests/test-visitor-serialization$(EXESUF)
 check-unit-y += tests/test-iov$(EXESUF)
+check-unit-y += tests/test-aio$(EXESUF)
 
 check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 
@@ -49,6 +50,7 @@ tests/check-qlist$(EXESUF): tests/check-qlist.o qlist.o qint.o
 tests/check-qfloat$(EXESUF): tests/check-qfloat.o qfloat.o
 tests/check-qjson$(EXESUF): tests/check-qjson.o $(qobject-obj-y) qemu-tool.o
 tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) iov.o libqemustub.a
+tests/test-aio$(EXESUF): tests/test-aio.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) libqemustub.a
 tests/test-iov$(EXESUF): tests/test-iov.o iov.o
 
 tests/test-qapi-types.c tests/test-qapi-types.h :\
tests/test-aio.c new file +667 -0

667 lines not on this page · raw message

Signature · 1 line
1.8.0
#2 lore raw

PATCH 2/2 tests: add thread pool unit tests

In reply to Paolo Bonzini
---
 tests/Makefile           |   2 +
 tests/test-thread-pool.c | 213 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 215 insertions(+)
 create mode 100644 tests/test-thread-pool.c
tests/Makefile +2 -0
index 61cbe3b..b60f0fb 100644
@@ -16,6 +16,7 @@ check-unit-y += tests/test-coroutine$(EXESUF)
 check-unit-y += tests/test-visitor-serialization$(EXESUF)
 check-unit-y += tests/test-iov$(EXESUF)
 check-unit-y += tests/test-aio$(EXESUF)
+check-unit-y += tests/test-thread-pool$(EXESUF)
 
 check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 
@@ -51,6 +52,7 @@ tests/check-qfloat$(EXESUF): tests/check-qfloat.o qfloat.o
 tests/check-qjson$(EXESUF): tests/check-qjson.o $(qobject-obj-y) qemu-tool.o
 tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) iov.o libqemustub.a
 tests/test-aio$(EXESUF): tests/test-aio.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) libqemustub.a
+tests/test-thread-pool$(EXESUF): tests/test-thread-pool.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) libqemustub.a
 tests/test-iov$(EXESUF): tests/test-iov.o iov.o
 
 tests/test-qapi-types.c tests/test-qapi-types.h :\
tests/test-thread-pool.c new file +213 -0

213 lines not on this page · raw message

Signature · 1 line
1.8.0
#3 lore raw
In reply to Paolo Bonzini
Quoted 5 lines · Paolo Bonzini

As requested. :) The tests pass on both Linux and Wine.

I'm not sure if it makes sense to include these in 1.3, but the idea has some worth.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 13 lines

Paolo Bonzini (2):
tests: add AioContext unit tests
tests: add thread pool unit tests

 tests/Makefile           |   4 +
 tests/test-aio.c         | 667 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/test-thread-pool.c | 213 +++++++++++++++
 3 files changed, 884 insertions(+)
 create mode 100644 tests/test-aio.c
 create mode 100644 tests/test-thread-pool.c
Signature · 1 line
1.8.0