summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/iotests.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-04-12 14:01:05 +0200
committerKevin Wolf <kwolf@redhat.com>2012-05-10 10:32:11 +0200
commitc68b039aa950aea1e534c7abd5ba5ce602a8f4db (patch)
treefe60999645dfa92e958b87e96b71c2d3089abd9c /tests/qemu-iotests/iotests.py
parent71df14fcbe5035d0728f30463414301eb62ad865 (diff)
downloadhqemu-c68b039aa950aea1e534c7abd5ba5ce602a8f4db.zip
hqemu-c68b039aa950aea1e534c7abd5ba5ce602a8f4db.tar.gz
qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command lines
A trailing space is left when qemu-img has no arguments, for example if -nocache is not used. This becomes an empty argument after split() and causes qemu-io to fail. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r--tests/qemu-iotests/iotests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index ec1a86a..36787cc 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -28,9 +28,9 @@ __all__ = ['imgfmt', 'imgproto', 'test_dir' 'qemu_img', 'qemu_io',
# This will not work if arguments or path contain spaces but is necessary if we
# want to support the override options that ./check supports.
-qemu_img_args = os.environ.get('QEMU_IMG', 'qemu-img').split(' ')
-qemu_io_args = os.environ.get('QEMU_IO', 'qemu-io').split(' ')
-qemu_args = os.environ.get('QEMU', 'qemu').split(' ')
+qemu_img_args = os.environ.get('QEMU_IMG', 'qemu-img').strip().split(' ')
+qemu_io_args = os.environ.get('QEMU_IO', 'qemu-io').strip().split(' ')
+qemu_args = os.environ.get('QEMU', 'qemu').strip().split(' ')
imgfmt = os.environ.get('IMGFMT', 'raw')
imgproto = os.environ.get('IMGPROTO', 'file')
OpenPOWER on IntegriCloud