tests: Test blockjob IDs
PATCH 1/1 tests: Test blockjob IDs
Since 7f0317cfc8da6 we have API to specify the ID of block jobs and we also guarantee that they are well-formed and unique.
This patch adds tests to check some common scenarios.
Signed-off-by Alberto Garcia <[email protected]>
--- tests/Makefile.include | 2 + tests/test-blockjob.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 tests/test-blockjob.c
tests/Makefile.include +2 -0
@@ -52,6 +52,7 @@ gcov-files-test-thread-pool-y = thread-pool.c gcov-files-test-hbitmap-y = util/hbitmap.c check-unit-y += tests/test-hbitmap$(EXESUF) gcov-files-test-hbitmap-y = blockjob.c +check-unit-y += tests/test-blockjob$(EXESUF) check-unit-y += tests/test-blockjob-txn$(EXESUF) check-unit-y += tests/test-x86-cpuid$(EXESUF) # all code tested by test-x86-cpuid is inside topology.h
@@ -449,6 +450,7 @@ tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(test-block-obj-y) tests/test-aio$(EXESUF): tests/test-aio.o $(test-block-obj-y) tests/test-rfifolock$(EXESUF): tests/test-rfifolock.o $(test-util-obj-y) tests/test-throttle$(EXESUF): tests/test-throttle.o $(test-block-obj-y) +tests/test-blockjob$(EXESUF): tests/test-blockjob.o $(test-block-obj-y) $(test-util-obj-y) tests/test-blockjob-txn$(EXESUF): tests/test-blockjob-txn.o $(test-block-obj-y) $(test-util-obj-y) tests/test-thread-pool$(EXESUF): tests/test-thread-pool.o $(test-block-obj-y) tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y)
tests/test-blockjob.c new file +147 -0
147 lines not on this page · raw message
Signature · 1 line
2.8.1
Kevin Wolf
AppliedAm 29.07.2016 um 16:31 hat Alberto Garcia geschrieben:
Quoted 6 lines
Since
7f0317cfc8da6we have API to specify the ID of block jobs and we also guarantee that they are well-formed and unique.This patch adds tests to check some common scenarios.
Signed-off-by Alberto Garcia <[email protected]>
Thanks, applied to the block branch.
Kevin