From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSRsY-0001Bg-KV for qemu-devel@nongnu.org; Thu, 10 May 2012 07:50:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSRsR-0006Cs-VY for qemu-devel@nongnu.org; Thu, 10 May 2012 07:49:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSRsR-0006CQ-OD for qemu-devel@nongnu.org; Thu, 10 May 2012 07:49:47 -0400 From: Kevin Wolf Date: Thu, 10 May 2012 13:49:12 +0200 Message-Id: <1336650574-12835-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1336650574-12835-1-git-send-email-kwolf@redhat.com> References: <1336650574-12835-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 08/30] qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command lines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Paolo Bonzini 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 Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 6 +++--- 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') -- 1.7.6.5