From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMFfY-00016o-Oz for qemu-devel@nongnu.org; Fri, 25 May 2018 12:34:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMFfU-00031Q-Ua for qemu-devel@nongnu.org; Fri, 25 May 2018 12:34:20 -0400 From: Kevin Wolf Date: Fri, 25 May 2018 18:33:24 +0200 Message-Id: <20180525163327.23097-12-kwolf@redhat.com> In-Reply-To: <20180525163327.23097-1-kwolf@redhat.com> References: <20180525163327.23097-1-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 11/14] qemu-iotests: Rewrite 211 for blockdev-create job List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, mreitz@redhat.com, jsnow@redhat.com, eblake@redhat.com, pkrempa@redhat.com, qemu-devel@nongnu.org This rewrites the test case 211 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/211 | 384 ++++++++++++++++++--------------------------- tests/qemu-iotests/211.out | 123 ++++++++------- tests/qemu-iotests/group | 2 +- 3 files changed, 227 insertions(+), 282 deletions(-) diff --git a/tests/qemu-iotests/211 b/tests/qemu-iotests/211 index 1edec26517..2fd89cfb32 100755 --- a/tests/qemu-iotests/211 +++ b/tests/qemu-iotests/211 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test VDI and file image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,229 +20,157 @@ # along with this program. If not, see . # -# creator -owner=kwolf@redhat.com - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -status=1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt vdi -_supported_proto file -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=== Successful image creation (defaults) ===" -echo - -size=$((128 * 1024 * 1024)) - -run_qemu <