OSDN Git Service

qemu-iotests: add iotests Python module
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 29 Feb 2012 13:25:21 +0000 (13:25 +0000)
committerKevin Wolf <kwolf@redhat.com>
Wed, 29 Feb 2012 14:48:44 +0000 (15:48 +0100)
commitf345cfd01935c6d7ab19f841a2eee2901ca3221e
treea2309f62b9275adf01af876c46efc2030828684f
parent049255b60c2bd95df09e3da9de0d9658b2ec4a98
qemu-iotests: add iotests Python module

Block layer tests that involve QMP commands rather than qemu-img or
qemu-io are not well-suited for shell scripting.  This patch adds a
Python module which allows tests to be written in Python instead.

The basic API is:

  VM          - class for launching and interacting with a VM
  QMPTestCase - abstract base class for tests that use QMP
  qemu_img()  - wrapper function for invoking qemu-img
  qemu_io()   - wrapper function for invoking qemu-io
  imgfmt      - the image format under test (e.g. qcow2, qed)
  test_dir    - scratch directory path for temporary files
  main()      - entry point for running tests

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/iotests.py [new file with mode: 0644]