From patchwork Fri Sep 1 10:54:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 9933889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E04986021C for ; Fri, 1 Sep 2017 10:56:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3C842852B for ; Fri, 1 Sep 2017 10:56:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8B692856F; Fri, 1 Sep 2017 10:56:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 180A5285D1 for ; Fri, 1 Sep 2017 10:56:08 +0000 (UTC) Received: from localhost ([::1]:34986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnjcI-0005rf-Gh for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Sep 2017 06:56:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnjbG-0005kn-P2 for qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:55:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnjbA-0008Sp-Tl for qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:54:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50448) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnjb4-0008Pu-Ri; Fri, 01 Sep 2017 06:54:46 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DBCBE61485; Fri, 1 Sep 2017 10:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DBCBE61485 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=berrange@redhat.com Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C8197C883; Fri, 1 Sep 2017 10:54:43 +0000 (UTC) From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 1 Sep 2017 11:54:33 +0100 Message-Id: <20170901105434.3288-2-berrange@redhat.com> In-Reply-To: <20170901105434.3288-1-berrange@redhat.com> References: <20170901105434.3288-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 01 Sep 2017 10:54:46 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] iotests: rewrite 192 to use _launch_qemu to fix LUKS support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi , Fam Zheng Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The LUKS driver requires extra args to QEMU to setup passwords. The _launch_qemu function takes care of this, so convert the test to use this function and use correct -drive syntax Signed-off-by: Daniel P. Berrange Reviewed-by: Eric Blake --- tests/qemu-iotests/192 | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192 index b50a2c0c8e..595f0d786a 100755 --- a/tests/qemu-iotests/192 +++ b/tests/qemu-iotests/192 @@ -37,6 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # get standard environment, filters and checks . ./common.rc . ./common.filter +. ./common.qemu _supported_fmt generic _supported_proto file @@ -49,13 +50,21 @@ fi size=64M _make_test_img $size -{ -echo "nbd_server_start unix:$TEST_DIR/nbd" -echo "nbd_server_add -w drive0" -echo "q" -} | $QEMU -nodefaults -display none -monitor stdio \ - -drive format=$IMGFMT,file=$TEST_IMG,if=ide,id=drive0 \ - -incoming defer 2>&1 | _filter_testdir | _filter_qemu | _filter_hmp +if test "$IMGOPTSSYNTAX" = "true" +then + DRIVE_ARG=if=ide,id=drive0,$TEST_IMG +else + DRIVE_ARG=if=ide,id=drive0,format=$IMGFMT,file=$TEST_IMG +fi + +qemu_comm_method="monitor" +_launch_qemu -drive $DRIVE_ARG -incoming defer +h=$QEMU_HANDLE +QEMU_COMM_TIMEOUT=1 + +_send_qemu_cmd $h "nbd_server_start unix:$TEST_DIR/nbd" "(qemu)" +_send_qemu_cmd $h "nbd_server_add -w drive0" "(qemu)" +_send_qemu_cmd $h "q" "(qemu)" # success, all done echo "*** done"