Commit Message

This patch is part of the Fast Virtual Disk (FVD) proposal.
See http://wiki.qemu.org/Features/FVD.
This patch extends qemu-io in two ways. First, it adds the 'sim' command to
work with the simulated block device driver 'blksim', which allows a developer
to fully control the order of disk I/Os, the order of callbacks, and the
return code of every I/O operation. Second, it adds a fully automated testing
mode, 'qemu-io --auto'. This mode can, e.g., simulate 1,000 threads
concurrently submitting overlapping disk I/O requests to QEMU block drivers,
use blksim to inject I/O errors and race conditions, and automatically verify
the correctness of I/O results. This tool can run unattended to exercise an
unlimited number of randomized test cases. Once it finds a bug, the bug is
precisely repeatable with the help of blksim, even if it is a rare race
condition bug. This makes debugging much easier.
Signed-off-by: Chunqiang Tang <ctang@us.ibm.com>
---
qemu-io-auto.c | 947 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
qemu-io-sim.c | 127 ++++++++
qemu-io.c | 50 +++-
qemu-tool.c | 107 ++++++-
4 files changed, 1209 insertions(+), 22 deletions(-)
create mode 100644 qemu-io-auto.c
create mode 100644 qemu-io-sim.c