From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569959524; cv=none; d=zoho.com; s=zohoarc; b=AVpdxD5ahx5ankKIg3sS5wUygIT3fPG8TGSrdaFX+gj8xyqySpPz4u5hILsj1e7AjsZ2MFbWyt4Jokdzxp3PsuBE5l66zw2rK876lXVAJTMcJo+PDqbNyXxWZ39oYn7slyv7FkcASTqr97C9f8gZFH3hIfV5mRRiJGclD3ehYsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569959524; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=FEKbDXwS5sqGMyT80qL7r1ru0VWm4xKpr+GY2l9EU6Q=; b=JzCK6qChSrIqrX/Vm7R1G7s+GUvERsNxAqxN0onwPItCCYous0qO+U4PnxSL5yXQwYPVkrJRkBtJ9yRSSs2Cc9Vzkx3jPYdKoYHQGFNa1ZwxEK54XGFIaRIY4Ht26BEQP/r3cy9GXJuby47peGP6ExO0l2lmkSVbeRCP956zuYI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569959524655945.2659675461172; Tue, 1 Oct 2019 12:52:04 -0700 (PDT) Received: from localhost ([::1]:47542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOBm-000090-6o for importer@patchew.org; Tue, 01 Oct 2019 15:52:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53778) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7I-0004BI-FL for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7H-0007aN-JC for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45000) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7F-0007Z5-AX; Tue, 01 Oct 2019 15:47:21 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9621A8980F4; Tue, 1 Oct 2019 19:47:20 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 307285C1D4; Tue, 1 Oct 2019 19:47:20 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 01/67] iotests.py: Read $IMGOPTS Date: Tue, 1 Oct 2019 21:46:09 +0200 Message-Id: <20191001194715.2796-2-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Tue, 01 Oct 2019 19:47:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We do not do anything with yet, but this is the first step. Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 1c5fce3e9e..7030900807 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -69,6 +69,12 @@ output_dir =3D os.environ.get('OUTPUT_DIR', '.') cachemode =3D os.environ.get('CACHEMODE') qemu_default_machine =3D os.environ.get('QEMU_DEFAULT_MACHINE') =20 +imgopts =3D os.environ.get('IMGOPTS', '') +if len(imgopts) =3D=3D 0: + imgopts =3D [] +else: + imgopts =3D imgopts.split(',') + socket_scm_helper =3D os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_help= er') =20 luks_default_secret_object =3D 'secret,id=3Dkeysec0,data=3D' + \ --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960068; cv=none; d=zoho.com; s=zohoarc; b=SsTTBSZNJCm7LNHQpXNDD5crkSL5LPNELnZ+Au8uKjq6yP8zgyGmNBV6q0MHE1f5O0/gqzkRqvL8cM6X3S1/La7HjkW5Yj+MGS3Wse9bdYCq20n7WHGHemaaNsquxBQZIwiLPbClJUlW2wNhew/YSeRu8hdyrzcGC/4LRl8kI5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960068; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=JlRVXpZ8w9KJl3uQ+CcXiQOqB9QMOP439JBx6bkgm54=; b=GDpWX14u65LO2cbHJGhXo/NNjEEuM9MHsZDH4fJZKNs4QwzoSrv4S57/p6Gtccl06EkounrdzTERANZKYBL7sN/6pz59LDJxnTPzb1wW1lj8dmdM1ewZm0/UxpIwcaN0J5zALn+Wx8u0yLoUwlHa/s9Z8kUVqx0mDmEiX1jWRME= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960068268626.0723496444972; Tue, 1 Oct 2019 13:01:08 -0700 (PDT) Received: from localhost ([::1]:47632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOKT-0007LT-9c for importer@patchew.org; Tue, 01 Oct 2019 16:01:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53806) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7K-0004F0-Ps for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7J-0007bk-Rz for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61685) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7H-0007a6-Ky; Tue, 01 Oct 2019 15:47:23 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC6E418C8907; Tue, 1 Oct 2019 19:47:22 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76CC85D712; Tue, 1 Oct 2019 19:47:22 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 02/67] iotests.py: Add @skip_for_imgopts() Date: Tue, 1 Oct 2019 21:46:10 +0200 Message-Id: <20191001194715.2796-3-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Tue, 01 Oct 2019 19:47:22 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 7030900807..cdcb62c4ac 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -950,6 +950,19 @@ def skip_if_unsupported(required_formats=3D[], read_on= ly=3DFalse): return func_wrapper return skip_test_decorator =20 +def skip_for_imgopts(unsupported_opts=3D[]): + '''Skip Test Decorator + Skips the test if imgopts contains any of the given options''' + def skip_test_decorator(func): + def func_wrapper(test_case: QMPTestCase, *args, **kwargs): + for opt in imgopts: + if any(unsupported in opt for unsupported in unsupported_o= pts): + test_case.case_skip('{}: Option {} is unsupported'.for= mat( + test_case, opt)) + return func(test_case, *args, **kwargs) + return func_wrapper + return skip_test_decorator + def execute_unittest(debug=3DFalse): """Executes unittests within the calling module.""" =20 --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960083; cv=none; d=zoho.com; s=zohoarc; b=Bch2EdW2KqM1U6hiNxrmn5jOH3/ab3f3zbROkneqRHIJpuzkfqPq/MM1RAdWvVOFxqVS81hV+UopRsD88iEBqYmjV31IrT1qQcodRInMgx9aRzKYYlUGMasoduiSUuDdEBhvcYUKCl1XwjGJ1uRro2k5DqHz+ag3lS7S3w20cnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960083; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jGgaATiC0yiIiKGwBZyNRmS+CDpJdcdd2W7F2Z48Vbk=; b=FAIEnpV/AL8rC0beDVoTzelNJUPBdq/CCqCm1tF1PDj6yYhqS4pjsylPMf8TxDbIAeTG19vxdv32kdW3Bqab2J/pyRHKp9NEU2/1LDotx1EMX0qQ8jkzqwfw+tdmvIxbMQCcjjRw05OdTR/OK2oqgTAYHokOfZxK0HE/IfoYFXQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960083119937.0049250138427; Tue, 1 Oct 2019 13:01:23 -0700 (PDT) Received: from localhost ([::1]:47634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOKl-0007d0-2G for importer@patchew.org; Tue, 01 Oct 2019 16:01:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53845) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7N-0004Jq-Hq for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7M-0007cw-I0 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7J-0007bP-UG; Tue, 01 Oct 2019 15:47:26 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33ED218C428F; Tue, 1 Oct 2019 19:47:25 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2528614C1; Tue, 1 Oct 2019 19:47:24 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 03/67] iotests.py: Add unsupported_imgopts Date: Tue, 1 Oct 2019 21:46:11 +0200 Message-Id: <20191001194715.2796-4-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 01 Oct 2019 19:47:25 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index cdcb62c4ac..b5ea424de4 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -998,7 +998,8 @@ def execute_setup_common(supported_fmts=3D[], supported_cache_modes=3D[], unsupported_fmts=3D[], supported_protocols=3D[], - unsupported_protocols=3D[]): + unsupported_protocols=3D[], + unsupported_imgopts=3D[]): """ Perform necessary setup for either script-style or unittest-style test= s. """ @@ -1016,6 +1017,10 @@ def execute_setup_common(supported_fmts=3D[], verify_platform(supported=3Dsupported_platforms) verify_cache_mode(supported_cache_modes) =20 + for opt in imgopts: + if any(unsupported in opt for unsupported in unsupported_imgopts): + notrun('not suitable for this option: %s' % opt) + debug =3D '-d' in sys.argv if debug: sys.argv.remove('-d') --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960422; cv=none; d=zoho.com; s=zohoarc; b=lTp5EKzgf8IORT+eVwFGlnf6vKELevA0Qtomr6AjhQiudVNRd+VxVf/NfjEo9DL0p8UAvaz9MgQ/isdX3Anwcxgivm8e3wpEcxfqA9As/zRrKfktJl6/BF7SjONtcdkiXeRq4wDk9V7IRWO84F7gtmS2c5//yNC9eIqGWWLU2hw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960422; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cZstsVRXcKGSUgSY+sqV4WyxE5arovQCku+0ZzRXU5w=; b=oVCn0WlfbABzC+Qzr+22lf2OTKxky754lAX9vD3MscAHZ+YBHSK8XJMYdLIlm6/IMlFmwynccMaAtHWUifgT3H+7f/iPc9hLLrxeJeBLIGj9zgfNmqgHF/0kJ9NmR8uG2EWW20TZY+z4o9I4lhWL92bPu+vI6u8Q1GQR60X3slY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960422157335.15867228479; Tue, 1 Oct 2019 13:07:02 -0700 (PDT) Received: from localhost ([::1]:47690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOQD-0003f2-RA for importer@patchew.org; Tue, 01 Oct 2019 16:06:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53874) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7Q-0004QU-JI for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7P-0007eK-EK for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60024) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7M-0007cY-79; Tue, 01 Oct 2019 15:47:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BFAD10DCC94; Tue, 1 Oct 2019 19:47:27 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 156795D6D0; Tue, 1 Oct 2019 19:47:26 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 04/67] iotests.py: create_test_image, remove_test_image Date: Tue, 1 Oct 2019 21:46:12 +0200 Message-Id: <20191001194715.2796-5-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:47:27 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Python tests should use these two new functions instead of qemu_img('create', ...) + os.remove(), so that user-supplied image options are interpreted and handled correctly. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index b5ea424de4..fce1ab04c9 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -122,6 +122,62 @@ def qemu_img_create(*args): =20 return qemu_img(*args) =20 +def create_test_image(filename, size=3DNone, fmt=3Dimgfmt, opts=3D[], + backing_file=3DNone, backing_fmt=3DNone, + objects=3D[], unsafe=3DFalse): + if fmt =3D=3D imgfmt: + # Only use imgopts for the default format + opts =3D imgopts + opts + + for i, opt in enumerate(opts): + if '$TEST_IMG' in opt: + opts[i] =3D opt.replace('$TEST_IMG', filename) + + # default luks support + if fmt =3D=3D 'luks': + if not any('key-secret' in opt for opt in opts): + opts.append(luks_default_key_secret_opt) + objects.append(luks_default_secret_object) + + args =3D ['create', '-f', fmt] + + if len(opts) > 0: + args +=3D ['-o', ','.join(opts)] + + if backing_file is not None: + args +=3D ['-b', backing_file] + + if backing_fmt is not None: + args +=3D ['-F', backing_fmt] + + if len(objects) > 0: + # Generate a [['--object', $obj], [...], ...] list and flatten it + args +=3D [arg for objarg in (['--object', obj] for obj in objects= ) \ + for arg in objarg] + + if unsafe: + args.append('-u') + + args.append(filename) + if size is not None: + args.append(str(size)) + + return qemu_img(*args) + +# Use this to remove images create with create_test_image in the +# default image format (iotests.imgfmt) +def remove_test_image(filename): + try: + os.remove(filename) + + data_file =3D next(opt.replace('data_file=3D', '') \ + .replace('$TEST_IMG', filename) \ + for opt in imgopts if opt.startswith('data_file= =3D')) + + os.remove(data_file) + except: + pass + def qemu_img_verbose(*args): '''Run qemu-img without suppressing its output and return the exit cod= e''' exitcode =3D subprocess.call(qemu_img_args + list(args)) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960626; cv=none; d=zoho.com; s=zohoarc; b=kvOKMPqIaFla4uunDjldwV/X/rK+wes1PsOO440xlRzxGJpukXD+8x7yiK4/s9AdNySqpN6ulNFEZreCZSOjzTTvZLw+WnUvXqthAhzd+76Trc80+LDwdzoXIdWQSGdNcyGHxOWgQ9Bpg2siUSRkfwQEexq6+viTpysH0GZHHbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960626; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xNSPjhf3HdCNT1ixJaekdY9zQ8r7LavXqWlZ+OmlF9w=; b=eUqDJjMb1tpFHUl5BbiOnkr8i2xGfReW5vEt2s0ssnXAx/sDp7Q0IDkB/wsn2TRiScv76B6q1wF/73JawqPVtRWNGG7XYAHBor9aWRH0V5tvuT2ukDCm7x7aqbiAwpTUGHJHlzZXDF5jPOeABEuR7RpHcGGiMExjrK0tOniGBW8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960626630347.0126339482804; Tue, 1 Oct 2019 13:10:26 -0700 (PDT) Received: from localhost ([::1]:47720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOTW-00075I-96 for importer@patchew.org; Tue, 01 Oct 2019 16:10:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53896) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7V-0004TX-07 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7T-0007fp-JU for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44266) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7O-0007dc-HN; Tue, 01 Oct 2019 15:47:30 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4CEF2A09A1; Tue, 1 Oct 2019 19:47:29 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5ED0260C5D; Tue, 1 Oct 2019 19:47:29 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 05/67] iotests.py: Add ImagePaths Date: Tue, 1 Oct 2019 21:46:13 +0200 Message-Id: <20191001194715.2796-6-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 01 Oct 2019 19:47:29 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" create_test_image() must be paired with an ImagePath so that the image is properly cleaned up with remove_test_image() instead of just os.remove(). Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index fce1ab04c9..5be6ca674c 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -440,8 +440,8 @@ class FilePaths(object): Use this context manager to generate filenames and ensure that the file gets deleted:: =20 - with FilePaths(['test.img']) as img_path: - qemu_img('create', img_path, '1G') + with FilePaths(['migration.sock']) as migration_sock_path: + # Set up and use UNIX socket on migration.sock # migration_sock_path is automatically deleted """ def __init__(self, names): @@ -460,6 +460,23 @@ class FilePaths(object): pass return False =20 +class ImagePaths(FilePaths): + """ + Same as FilePaths, except it calls remove_test_image() to clean up + (which ensures that external data files are cleaned up, too). + + Use this class for test images in the default format + (iotests.imgfmt): + + with ImagePaths(['test.img']) as img_path: + create_test_image(img_path, '1G') + # The test image is automatically cleaned up + """ + def __exit__(self, exc_type, exc_val, exc_tb): + for path in self.paths: + remove_test_image(path) + return False + class FilePath(FilePaths): """ FilePath is a specialization of FilePaths that takes a single filename. @@ -470,6 +487,17 @@ class FilePath(FilePaths): def __enter__(self): return self.paths[0] =20 +class ImagePath(ImagePaths): + """ + ImagePath is a specialization of ImagePaths that takes a single + filename. + """ + def __init__(self, name): + super(ImagePath, self).__init__([name]) + + def __enter__(self): + return self.paths[0] + def file_path_remover(): for path in reversed(file_path_remover.paths): try: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569959837; cv=none; d=zoho.com; s=zohoarc; b=UBn09tjnwHE8R0iVMgj789qQ6ufVC9j3ws22nowNhAasfisSUn3F5Z3YsorHfrrS+uQP0GBEhvWdKitZIWFTvin1UYJLOVyoMKJ5yhlTOW7LF7povhHME5Is2UM4mGyznnHHwIhDuXR14nBnz3FuL3Ggy6enu0sGIbJJHVeiPPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569959837; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=oRCFjGPt1GNg5MVmhva6xSGsiupIlBAen8JvjiI2m+c=; b=LtTK0Onj6o8GRBRNggIdm/GRpifsxAt1W9tFa4RBYtpedgLrhSnKOmxueU16e32c5TVdNRjaE6QBWyr93H7kXNL0a948qsg4VR5O7UZkwnQLCHBhNDjd8dDoDPKMlxFEodZqqWAYwHhaE7Af8psjjGlFhHvd+TJp6Sm/4WpqJsE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569959837814425.39397362669354; Tue, 1 Oct 2019 12:57:17 -0700 (PDT) Received: from localhost ([::1]:47604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOGq-0004lP-07 for importer@patchew.org; Tue, 01 Oct 2019 15:57:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54074) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7k-0004XI-P4 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7g-0007lC-Om for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59944) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7Q-0007em-RJ; Tue, 01 Oct 2019 15:47:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A80010C094A; Tue, 1 Oct 2019 19:47:32 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A59395D6D0; Tue, 1 Oct 2019 19:47:31 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 06/67] iotests.py: Add image_path() Date: Tue, 1 Oct 2019 21:46:14 +0200 Message-Id: <20191001194715.2796-7-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Tue, 01 Oct 2019 19:47:32 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Just like we have file_path() as an alternative to FilePath, this is an alternative fo ImagePath. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 5be6ca674c..280e6c2ec2 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -505,8 +505,12 @@ def file_path_remover(): except OSError: pass =20 +def image_path_remover(): + for path in reversed(image_path_remover.paths): + remove_test_image(path) =20 -def file_path(*names): + +def file_path(*names, remover=3Dfile_path_remover): ''' Another way to get auto-generated filename that cleans itself up. =20 Use is as simple as: @@ -515,19 +519,22 @@ def file_path(*names): sock =3D file_path('socket') ''' =20 - if not hasattr(file_path_remover, 'paths'): - file_path_remover.paths =3D [] - atexit.register(file_path_remover) + if not hasattr(remover, 'paths'): + remover.paths =3D [] + atexit.register(remover) =20 paths =3D [] for name in names: filename =3D file_pattern(name) path =3D os.path.join(test_dir, filename) - file_path_remover.paths.append(path) + remover.paths.append(path) paths.append(path) =20 return paths[0] if len(paths) =3D=3D 1 else paths =20 +def image_path(*names): + return file_path(*names, remover=3Dimage_path_remover) + def remote_filename(path): if imgproto =3D=3D 'file': return path --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960697; cv=none; d=zoho.com; s=zohoarc; b=UP68VJ+goBtNczI77oTr5K7qKTVPBkTYQe+TJq1L1WBPZ9NImy+7XbKqz3vmFikjq5JBd/sPOjJvB+3Q28HTyBpp79rKaN2jEQMZjxht1UOCj/wQafArEQidRSvKzmJ7F1Oi7VhvcnBPQ3ErtFRJcAQlOSmXjTMZOJS4hKtDHwc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960697; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=o4k1Zd5xt6aksViPAiDGGK/Sf1yveHNMfYJ2wj5G+mM=; b=L4al0Cesv2lp0ckw6v9PmTl60RtLNhBtWwb/YRDUv1lnlN3ofhm0m9YXpKvjBcUnK1xwxtGBYjUC/NKNgByspcmrliFqbu1JkXSBzkYeekFW2gDwYadhqZDDskXP1EYV3a3wwgdSafLJwaWnGuWoXOM+sHoIgjDLzO/SXLFmgE8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960697513506.33439394464017; Tue, 1 Oct 2019 13:11:37 -0700 (PDT) Received: from localhost ([::1]:47724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOUh-0008VY-Dk for importer@patchew.org; Tue, 01 Oct 2019 16:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54040) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7k-0004WU-Kn for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7g-0007lG-OG for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7U-0007fR-Rn; Tue, 01 Oct 2019 15:47:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E28410DCC98; Tue, 1 Oct 2019 19:47:34 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDA9C6012C; Tue, 1 Oct 2019 19:47:33 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 07/67] iotests.py: Filter data_file in filter_img_info Date: Tue, 1 Oct 2019 21:46:15 +0200 Message-Id: <20191001194715.2796-8-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:47:34 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" If $IMGOPTS contains a data_file reference, let filter_img_info filter all data_file information. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 280e6c2ec2..fb0a49372d 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -380,9 +380,13 @@ def filter_generated_node_ids(msg): =20 def filter_img_info(output, filename): lines =3D [] + user_data_file =3D any('data_file' in opt for opt in imgopts) for line in output.split('\n'): if 'disk size' in line or 'actual-size' in line: continue + if user_data_file: + if 'data file' in line: + continue line =3D line.replace(filename, 'TEST_IMG') \ .replace(imgfmt, 'IMGFMT') line =3D re.sub('iters: [0-9]+', 'iters: XXX', line) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569959811; cv=none; d=zoho.com; s=zohoarc; b=kKefHb6LhX7XhjMqprLPjDCgz1td6uellqEkiNR7VQoDMShIky/G+5SAl+CwFf0NVHiAz8Gv9FTgLFM3GhpROoBMYYCEubdF2T0fi92AgSJBdjvnaE6SmKAzbyWfiTr22uVhyQrA5s4P8GTcTNY3X0k/WJi+8hymNsC9rfdXB5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569959811; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=hOWD3Lu28NiDqW5RuhRXWKEfMTOzL/QZ1AU6qWrtB+M=; b=ZC7Yb0uWSqgmF/dcT9e9q6xUfg3myzkBCs8gmJnNe54d2aL1DG+pdz4e95A7HEWNt7vZhOd0ffVS/Ux0zmNGqP06O0XZ0ZxwBzxlk6oI5k5R4EhXByKzT20a+3KYShzNxkWYMLRYNjMbRQ+8SWz0YoNFjNWv+CPHmjnWRIsudU4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569959811321717.4067127644537; Tue, 1 Oct 2019 12:56:51 -0700 (PDT) Received: from localhost ([::1]:47592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOGP-0004Lh-7H for importer@patchew.org; Tue, 01 Oct 2019 15:56:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54111) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7l-0004YC-I1 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7k-0007pD-97 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58524) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7a-0007gP-Mv; Tue, 01 Oct 2019 15:47:42 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1E3230860BD; Tue, 1 Oct 2019 19:47:36 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E3555C1D4; Tue, 1 Oct 2019 19:47:36 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 08/67] iotests.py: Add filter_json_filename() Date: Tue, 1 Oct 2019 21:46:16 +0200 Message-Id: <20191001194715.2796-9-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 01 Oct 2019 19:47:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index fb0a49372d..9737dd881b 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -378,6 +378,9 @@ def filter_qmp_testfiles(qmsg): def filter_generated_node_ids(msg): return re.sub("#block[0-9]+", "NODE_NAME", msg) =20 +def filter_json_filename(msg): + return re.sub('json:{.*}', 'json:{ /* filtered */ }', msg) + def filter_img_info(output, filename): lines =3D [] user_data_file =3D any('data_file' in opt for opt in imgopts) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960135; cv=none; d=zoho.com; s=zohoarc; b=QTal0VWecezY6nmrLROzPYNYkDctbU6/uvhT3zM7FU6MbgkWh9Dmr+8OD0FInUv5slktHD7ED4BNUgq5zzd9JeU/D06iZ15pjECYffsrNrzRXGNPi6PRl1mDDv1ecVGOXBLBi2mp1ExTmhRSWGiYvRMzXWeOq4g9zx/gPOrKP3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960135; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=R6+hXUien23ozxCr216YO1q+gw3ZjRNKPb7CrFwRet8=; b=ZA8wGEYBRpVojW6+Wd624FSzvLlHVqAZhkC7PoyU9PtqJiz8OveJxMojCKNXx/eyQxSA0M9o6OPZewXwo94A4HASPTs8F6vCzRP+hzUIgHZW2JO5458nheFnH2UkPL3xMWhndIUx1DZnNCh0qb+K4zKw4Fkg/vka/p12HsB6X9s= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960135374958.4710218552805; Tue, 1 Oct 2019 13:02:15 -0700 (PDT) Received: from localhost ([::1]:47644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOLY-00086i-UV for importer@patchew.org; Tue, 01 Oct 2019 16:02:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54109) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7l-0004YB-Ll for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7k-0007pC-97 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52880) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7a-0007hM-Sk; Tue, 01 Oct 2019 15:47:44 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB9B9308402D; Tue, 1 Oct 2019 19:47:38 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88496614C1; Tue, 1 Oct 2019 19:47:38 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 09/67] iotests.py: Add @hide_fields to img_info_log Date: Tue, 1 Oct 2019 21:46:17 +0200 Message-Id: <20191001194715.2796-10-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 01 Oct 2019 19:47:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" You can specify fields here that should be hidden from the output. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 9737dd881b..f3c80ba4e9 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -201,7 +201,8 @@ def qemu_img_log(*args): log(result, filters=3D[filter_testfiles]) return result =20 -def img_info_log(filename, filter_path=3DNone, imgopts=3DFalse, extra_args= =3D[]): +def img_info_log(filename, filter_path=3DNone, imgopts=3DFalse, extra_args= =3D[], + hide_fields=3D[]): args =3D [ 'info' ] if imgopts: args.append('--image-opts') @@ -210,7 +211,13 @@ def img_info_log(filename, filter_path=3DNone, imgopts= =3DFalse, extra_args=3D[]): args +=3D extra_args args.append(filename) =20 - output =3D qemu_img_pipe(*args) + output =3D qemu_img_pipe(*args).splitlines(keepends=3DTrue) + + output =3D [line for line in output + if not any(line.strip().startswith(field) + for field in hide_fields)] + output =3D ''.join(output) + if not filter_path: filter_path =3D filename log(filter_img_info(output, filter_path)) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961155; cv=none; d=zoho.com; s=zohoarc; b=hfqjDWfNpCKYw90oN9aWB12o1QX5jOehMjuit/BXzrbTahwVl/zvgwvXT0OuNYdl8kJvAGcau8S/GaM5ktWt8zGqErXT6YJnGebyr+8cWkNWy+RL0fD1/qMOZYS+/iLmyekR6HzybtxmpH7HEYHCQGYelfRxj4O4wuoSGbc5O7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961155; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pFY2rXubCD9bz/4OQxgIvyw0qV7MjQe4GGYDVDF2OI0=; b=RzY+HTIR2tuHN9G2lUcQnLkUQh6XjTF1gxqQ7shLe3su4mZ4JbAvs7x2k/B7nS7ULxfyy+v65h5l3pMk07uQ7J/OKC22GOzuzbKr8vjzg6OmelIJoHT4F0lFMhJqGQmCjy1pgdkNkIG2mHHkw/2RBLNX65qtifQyhPGyUO0CClY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961155419487.2463521628206; Tue, 1 Oct 2019 13:19:15 -0700 (PDT) Received: from localhost ([::1]:47773 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOc0-00051N-Qx for importer@patchew.org; Tue, 01 Oct 2019 16:19:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54190) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7n-0004aO-JE for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7m-0007rq-6d for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37726) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7c-0007i6-N4; Tue, 01 Oct 2019 15:47:46 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 40CC610CC208; Tue, 1 Oct 2019 19:47:41 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D103D19C6A; Tue, 1 Oct 2019 19:47:40 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 10/67] iotests/169: Skip persistent cases for compat=0.10 Date: Tue, 1 Oct 2019 21:46:18 +0200 Message-Id: <20191001194715.2796-11-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 01 Oct 2019 19:47:41 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" compat=3D0.10 images cannot store persistent dirty bitmaps; let 169 skip all such test cases when compat=3D0.10 is in the $IMGOPTS. Signed-off-by: Max Reitz --- tests/qemu-iotests/169 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169 index 8c204caf20..5e978b7b7d 100755 --- a/tests/qemu-iotests/169 +++ b/tests/qemu-iotests/169 @@ -41,7 +41,10 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.vm_b.shutdown() os.remove(disk_a) os.remove(disk_b) - os.remove(mig_file) + try: + os.remove(mig_file) + except OSError: + pass =20 def setUp(self): qemu_img('create', '-f', iotests.imgfmt, disk_a, size) @@ -79,6 +82,10 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): def do_test_migration_resume_source(self, persistent, migrate_bitmaps): granularity =3D 512 =20 + if persistent and 'compat=3D0.10' in iotests.imgopts: + self.case_skip('compat=3D0.10 does not support persistent dirt= y ' + + 'bitmaps') + # regions =3D ((start, count), ...) regions =3D ((0, 0x10000), (0xf0000, 0x10000), @@ -137,6 +144,10 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): shared_storage): granularity =3D 512 =20 + if persistent and 'compat=3D0.10' in iotests.imgopts: + self.case_skip('compat=3D0.10 does not support persistent dirt= y ' + + 'bitmaps') + # regions =3D ((start, count), ...) regions =3D ((0, 0x10000), (0xf0000, 0x10000), --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960666; cv=none; d=zoho.com; s=zohoarc; b=YUikWBT78t6aCTJgbuuZgKc9rz+1mwHftL5sEHxE+XXrQz+FlYiuDMNecmomYRrfRZkv9IfvcIRHF44SOBnHwT0so1tcknBa2peae7BQc2dhPUHGErEC6YEwdnGXxvPErLsaXOdEtm7f5lb9E08KKsIUhKSFlyDbEIfEAKK5ewo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960666; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=RJNHMXbe+82qbqqRpebm3iR0jOW6s0Gx6YPqqidyAl8=; b=UvIsLG2JDh9knSDl6fERTgKopKRsfdtqynPPo+IUjOJcWss4/T+U5df42a/5SA9FgGzISZQ0D3XKeuVEcyY/FwJ2dB4BzRiqQCNtOVNFqMy3ebZn53v5Z1AoTmzY1+XfBSVgMtyvVVktu+3DfK1FtUaHrkEWxeCAst9VPbRIyCU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960666900824.4475272309328; Tue, 1 Oct 2019 13:11:06 -0700 (PDT) Received: from localhost ([::1]:47722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOUC-0007s6-SU for importer@patchew.org; Tue, 01 Oct 2019 16:11:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54208) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7o-0004b4-4U for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7m-0007sK-Hx for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36219) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7c-0007j5-Ne; Tue, 01 Oct 2019 15:47:46 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 913BDC04D293; Tue, 1 Oct 2019 19:47:43 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AB731001947; Tue, 1 Oct 2019 19:47:42 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 11/67] iotests/224: Filter json:{} from commit command Date: Tue, 1 Oct 2019 21:46:19 +0200 Message-Id: <20191001194715.2796-12-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 01 Oct 2019 19:47:43 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We only care that block-commit works with json:{} filenames, we do not need to see their exact values in the output. Signed-off-by: Max Reitz --- tests/qemu-iotests/224 | 15 ++++++++++++--- tests/qemu-iotests/224.out | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/224 b/tests/qemu-iotests/224 index d0d0c44104..e227d3ab3c 100755 --- a/tests/qemu-iotests/224 +++ b/tests/qemu-iotests/224 @@ -22,12 +22,19 @@ =20 import iotests from iotests import log, qemu_img, qemu_io_silent, filter_qmp_testfiles, \ - filter_qmp_imgfmt + filter_qmp_imgfmt, filter_json_filename import json +import re =20 # Need backing file support (for arbitrary backing formats) iotests.script_initialize(supported_fmts=3D['qcow2', 'qcow', 'qed']) =20 +def filter_json_top_or_base(qmsg): + def _filter(key, value): + if key =3D=3D 'base' or key =3D=3D 'top': + return filter_json_filename(value) + return value + return iotests.filter_qmp(qmsg, _filter) =20 # There are two variations of this test: # (1) We do not set filter_node_name. In that case, the commit_top @@ -104,7 +111,8 @@ for filter_node_name in False, True: top=3Dmid_name, base=3Dbase_name, speed=3D1, - filters=3D[filter_qmp_testfiles, filter_qmp_imgfmt= ]) + filters=3D[filter_qmp_testfiles, filter_qmp_imgfmt, + filter_json_top_or_base]) else: vm.qmp_log('block-commit', job_id=3D'commit', @@ -112,7 +120,8 @@ for filter_node_name in False, True: top=3Dmid_name, base=3Dbase_name, speed=3D1, - filters=3D[filter_qmp_testfiles, filter_qmp_imgfmt= ]) + filters=3D[filter_qmp_testfiles, filter_qmp_imgfmt, + filter_json_top_or_base]) =20 vm.qmp_log('job-pause', id=3D'commit') =20 diff --git a/tests/qemu-iotests/224.out b/tests/qemu-iotests/224.out index 23374a1d29..287d2eac7a 100644 --- a/tests/qemu-iotests/224.out +++ b/tests/qemu-iotests/224.out @@ -3,7 +3,7 @@ =20 {"execute": "blockdev-add", "arguments": {"backing": {"backing": {"backing= ": {"driver": "null-co"}, "driver": "IMGFMT", "file": {"driver": "file", "f= ilename": "TEST_DIR/PID-base.img"}, "node-name": "base"}, "driver": "IMGFMT= ", "file": {"driver": "file", "filename": "TEST_DIR/PID-mid.img"}, "node-na= me": "mid"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TE= ST_DIR/PID-top.img"}, "node-name": "top"}} {"return": {}} -{"execute": "block-commit", "arguments": {"base": "json:{\"backing\": {\"d= river\": \"null-co\"}, \"driver\": \"IMGFMT\", \"file\": {\"driver\": \"fil= e\", \"filename\": \"TEST_DIR/PID-base.img\"}}", "device": "top", "job-id":= "commit", "speed": 1, "top": "json:{\"backing\": {\"backing\": {\"driver\"= : \"null-co\"}, \"driver\": \"IMGFMT\", \"file\": {\"driver\": \"file\", \"= filename\": \"TEST_DIR/PID-base.img\"}}, \"driver\": \"IMGFMT\", \"file\": = {\"driver\": \"file\", \"filename\": \"TEST_DIR/PID-mid.img\"}}"}} +{"execute": "block-commit", "arguments": {"base": "json:{ /* filtered */ }= ", "device": "top", "job-id": "commit", "speed": 1, "top": "json:{ /* filte= red */ }"}} {"return": {}} {"execute": "job-pause", "arguments": {"id": "commit"}} {"return": {}} @@ -12,7 +12,7 @@ =20 {"execute": "blockdev-add", "arguments": {"backing": {"backing": {"backing= ": {"driver": "null-co"}, "driver": "IMGFMT", "file": {"driver": "file", "f= ilename": "TEST_DIR/PID-base.img"}, "node-name": "base"}, "driver": "IMGFMT= ", "file": {"driver": "file", "filename": "TEST_DIR/PID-mid.img"}, "node-na= me": "mid"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TE= ST_DIR/PID-top.img"}, "node-name": "top"}} {"return": {}} -{"execute": "block-commit", "arguments": {"base": "json:{\"backing\": {\"d= river\": \"null-co\"}, \"driver\": \"IMGFMT\", \"file\": {\"driver\": \"fil= e\", \"filename\": \"TEST_DIR/PID-base.img\"}}", "device": "top", "filter-n= ode-name": "filter_node", "job-id": "commit", "speed": 1, "top": "json:{\"b= acking\": {\"backing\": {\"driver\": \"null-co\"}, \"driver\": \"IMGFMT\", = \"file\": {\"driver\": \"file\", \"filename\": \"TEST_DIR/PID-base.img\"}},= \"driver\": \"IMGFMT\", \"file\": {\"driver\": \"file\", \"filename\": \"T= EST_DIR/PID-mid.img\"}}"}} +{"execute": "block-commit", "arguments": {"base": "json:{ /* filtered */ }= ", "device": "top", "filter-node-name": "filter_node", "job-id": "commit", = "speed": 1, "top": "json:{ /* filtered */ }"}} {"return": {}} {"execute": "job-pause", "arguments": {"id": "commit"}} {"return": {}} --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960444; cv=none; d=zoho.com; s=zohoarc; b=lNOhHEl1fw7jOeltQUFFDyagFzh/1RVKvyU3Ey0NpFdxmjJiKfFPJxNe66YA5yNsnglknrDNK3JiiZGqLS0cXJMIovjleO9BnfeaW0gj/1jHwrd1G0ENaMxXH8XC7iQJIjhs6ZcIcNic5QAPwrlDu+3xNtCXbURT/VZ330H5m0U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960444; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=bDT7ApvQJj2tzC2ljplcOdFSWbLrfxPG0W1N2suvqsM=; b=lY+yvuQCU4HWmV7AQceWGhiqLHHUZaTVQZyhjYByo0UgrZKEW1Hc4MZ56jeMofESVNN0O8ukfBeP8Ox7wk+pJrT4xmoR0iXg5c9XyPJhTL7HX5nxXSRZop6hdLtpLWaODn/Ao4/d8NIQhQlJOI0XfX3cbz6Ss9KhbgLCzRgXE2c= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960444426317.21727477728814; Tue, 1 Oct 2019 13:07:24 -0700 (PDT) Received: from localhost ([::1]:47692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOQa-0003zs-8N for importer@patchew.org; Tue, 01 Oct 2019 16:07:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54204) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7o-0004b1-2f for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7m-0007s7-DX for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7g-0007kF-NA; Tue, 01 Oct 2019 15:47:48 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D53CD3082149; Tue, 1 Oct 2019 19:47:45 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F843100197A; Tue, 1 Oct 2019 19:47:45 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 12/67] iotests/228: Filter json:{} filenames Date: Tue, 1 Oct 2019 21:46:20 +0200 Message-Id: <20191001194715.2796-13-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 01 Oct 2019 19:47:45 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We only care about where we get json:{} filenames (and what the non-json:{} filenames look like), but not about how the json:{} filenames look. Filter them so we will not get a different output for qcow2 images with external data files. Signed-off-by: Max Reitz --- tests/qemu-iotests/228 | 8 ++++---- tests/qemu-iotests/228.out | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/228 b/tests/qemu-iotests/228 index 9785868ab3..e507db4f27 100755 --- a/tests/qemu-iotests/228 +++ b/tests/qemu-iotests/228 @@ -22,7 +22,7 @@ =20 import iotests from iotests import log, qemu_img, filter_testfiles, filter_imgfmt, \ - filter_qmp_testfiles, filter_qmp_imgfmt + filter_qmp_testfiles, filter_qmp_imgfmt, filter_json_filename =20 # Need backing file and change-backing-file support iotests.script_initialize(supported_fmts=3D['qcow2', 'qed']) @@ -32,14 +32,14 @@ def log_node_info(node): log('') =20 log('bs->filename: ' + node['image']['filename'], - filters=3D[filter_testfiles, filter_imgfmt]) + filters=3D[filter_testfiles, filter_imgfmt, filter_json_filename]) log('bs->backing_file: ' + node['backing_file'], - filters=3D[filter_testfiles, filter_imgfmt]) + filters=3D[filter_testfiles, filter_imgfmt, filter_json_filename]) =20 if 'backing-image' in node['image']: log('bs->backing->bs->filename: ' + node['image']['backing-image']['filename'], - filters=3D[filter_testfiles, filter_imgfmt]) + filters=3D[filter_testfiles, filter_imgfmt, filter_json_filena= me]) else: log('bs->backing: (none)') =20 diff --git a/tests/qemu-iotests/228.out b/tests/qemu-iotests/228.out index 4217df24fe..f8155019d5 100644 --- a/tests/qemu-iotests/228.out +++ b/tests/qemu-iotests/228.out @@ -17,7 +17,7 @@ bs->backing->bs->filename: TEST_DIR/PID-base.img {"execute": "change-backing-file", "arguments": {"backing-file": "null-co:= //", "device": "node0", "image-node-name": "node0"}} {"return": {}} =20 -bs->filename: json:{"backing": {"driver": "IMGFMT", "file": {"driver": "fi= le", "filename": "TEST_DIR/PID-base.img"}}, "driver": "IMGFMT", "file": {"d= river": "file", "filename": "TEST_DIR/PID-top.img"}} +bs->filename: json:{ /* filtered */ } bs->backing_file: null-co:// bs->backing->bs->filename: TEST_DIR/PID-base.img =20 @@ -31,7 +31,7 @@ bs->backing->bs->filename: TEST_DIR/PID-base.img {"execute": "change-backing-file", "arguments": {"backing-file": "file:TES= T_DIR/PID-base.img", "device": "node0", "image-node-name": "node0"}} {"return": {}} =20 -bs->filename: json:{"backing": {"driver": "IMGFMT", "file": {"driver": "fi= le", "filename": "TEST_DIR/PID-base.img"}}, "driver": "IMGFMT", "file": {"d= river": "file", "filename": "TEST_DIR/PID-top.img"}} +bs->filename: json:{ /* filtered */ } bs->backing_file: file:TEST_DIR/PID-base.img bs->backing->bs->filename: TEST_DIR/PID-base.img =20 @@ -54,7 +54,7 @@ bs->backing->bs->filename: TEST_DIR/PID-base.img {"execute": "blockdev-add", "arguments": {"backing": "null", "driver": "IM= GFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "nod= e-name": "node0"}} {"return": {}} =20 -bs->filename: json:{"backing": {"driver": "null-co"}, "driver": "IMGFMT", = "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}} +bs->filename: json:{ /* filtered */ } bs->backing_file: null-co:// bs->backing->bs->filename: null-co:// =20 @@ -65,7 +65,7 @@ bs->backing->bs->filename: null-co:// {"execute": "blockdev-add", "arguments": {"backing": null, "driver": "IMGF= MT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-= name": "node0"}} {"return": {}} =20 -bs->filename: json:{"backing": null, "driver": "IMGFMT", "file": {"driver"= : "file", "filename": "TEST_DIR/PID-top.img"}} +bs->filename: json:{ /* filtered */ } bs->backing_file: TEST_DIR/PID-base.img bs->backing: (none) =20 --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960160; cv=none; d=zoho.com; s=zohoarc; b=jAn+FrLgEHI4kalmzw+2KZ4g4dLO01+xN1T0MNJ5huJqzpqzyGU68T4J97ZiNefZJaRoLzY3UCnmNe+i5Ks7Xb4t7AzJfNrEBG2WDg2SE6+wsC5r8hXT3X0hcEsWPcqJZAv3vQj4vc5DdImcGhJmXORsYYUISZlKgAomXDFdhoI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960160; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZNYrrVGb7Tt1vsPdx8O5b4gtLBWU4ES/mrd7i14HwsU=; b=WPEkH85RUtAoHnZTz1llJ5WBpRAc1RIqv4Ki0LRt/5M7OnRFTK4AxzIquAVqRu86lJqIKCkgFtbA7pY4425BUfHn6yhynk+VWd+AJGRDN6RvqKVaotXa7vqozDrvNvgTdC2xlXdFAHCF+gnJLpNVeWtrZeOR/ApnMH4ZSt4wUm8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960160017727.4277872983432; Tue, 1 Oct 2019 13:02:40 -0700 (PDT) Received: from localhost ([::1]:47646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOM2-0008VR-5h for importer@patchew.org; Tue, 01 Oct 2019 16:02:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54205) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7o-0004b2-0x for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7m-0007sQ-J6 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52918) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7h-0007l0-7X; Tue, 01 Oct 2019 15:47:49 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3226F30842AF; Tue, 1 Oct 2019 19:47:48 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B924919C6A; Tue, 1 Oct 2019 19:47:47 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 13/67] iotests/242: Hide refcount bit information Date: Tue, 1 Oct 2019 21:46:21 +0200 Message-Id: <20191001194715.2796-14-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 01 Oct 2019 19:47:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" It does not matter, and this lets the test work with different refcount widths. Signed-off-by: Max Reitz --- tests/qemu-iotests/242 | 6 +++--- tests/qemu-iotests/242.out | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 index 7c2685b4cc..21f69a0d2c 100755 --- a/tests/qemu-iotests/242 +++ b/tests/qemu-iotests/242 @@ -35,7 +35,7 @@ flag_offset =3D 0x5000f =20 def print_bitmap(extra_args): log('qemu-img info dump:\n') - img_info_log(disk, extra_args=3Dextra_args) + img_info_log(disk, extra_args=3Dextra_args, hide_fields=3D['refcount b= its']) result =3D json.loads(qemu_img_pipe('info', '--force-share', '--output=3Djson', disk)) if 'bitmaps' in result['format-specific']['data']: @@ -98,9 +98,9 @@ add_bitmap(1, True, False) log('Write an unknown bitmap flag \'{}\' into a new QCOW2 image at offset = {}' .format(hex(bitmap_flag_unknown), flag_offset)) toggle_flag(flag_offset) -img_info_log(disk) +img_info_log(disk, hide_fields=3D['refcount bits']) toggle_flag(flag_offset) log('Unset the unknown bitmap flag \'{}\' in the bitmap directory entry:\n' .format(hex(bitmap_flag_unknown))) -img_info_log(disk) +img_info_log(disk, hide_fields=3D['refcount bits']) log('Test complete') diff --git a/tests/qemu-iotests/242.out b/tests/qemu-iotests/242.out index 7ac8404d11..112b389241 100644 --- a/tests/qemu-iotests/242.out +++ b/tests/qemu-iotests/242.out @@ -13,7 +13,6 @@ cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false - refcount bits: 16 corrupt: false =20 No bitmap in JSON format output @@ -38,7 +37,6 @@ Format specific information: flags: name: bitmap-1 granularity: 32768 - refcount bits: 16 corrupt: false =20 The same bitmaps in JSON format: @@ -75,7 +73,6 @@ Format specific information: [0]: auto name: bitmap-2 granularity: 65536 - refcount bits: 16 corrupt: false =20 The same bitmaps in JSON format: @@ -117,7 +114,6 @@ Format specific information: [1]: auto name: bitmap-2 granularity: 65536 - refcount bits: 16 corrupt: false =20 The same bitmaps in JSON format: @@ -160,7 +156,6 @@ Format specific information: [0]: auto name: bitmap-0 granularity: 16384 - refcount bits: 16 corrupt: false =20 Test complete --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960967; cv=none; d=zoho.com; s=zohoarc; b=cUxydTZf0ay8h9APSDxLm2eGEGiicSim7bjA7bM0VjQm4qT25nhozx6CzCoNS3jHi/3Y9O+bzbP94+CJMlNog49kbqrHvUQ+0sP7thUV4XuyEnjrqOlRT3BD5D3UY1JJlweZV6sgb4DaXZx0+TpMDL5tzQs5mIeuSugFHVgfhjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960967; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XEco58OTsOzw2za0y3EEVPsjJU1lsdVvcVlbQzxgWDo=; b=TMJ7ct05bNvSmobIU63fEbAGoWBfCnEGG333iu//UxKcNHtclSoyB8UTFAWxkLxPep0wohOteGoddSFnXa1o0YGbGHmbAD5YD2CU95XWVm704enE0p4fTJipxp3G3iyyf91rEZZ6CcRh+5X2nDQBpD9Q74PDGn2hRdweWjaiq48= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960967325514.2837585700137; Tue, 1 Oct 2019 13:16:07 -0700 (PDT) Received: from localhost ([::1]:47756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOZ3-0003ZJ-Ql for importer@patchew.org; Tue, 01 Oct 2019 16:16:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54255) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7q-0004dI-20 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7o-0007tf-B8 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44048) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7j-0007nP-I1; Tue, 01 Oct 2019 15:47:52 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A10373018FC5; Tue, 1 Oct 2019 19:47:50 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D78B6012C; Tue, 1 Oct 2019 19:47:49 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 14/67] iotests: Use unsupported_imgopts in Python tests Date: Tue, 1 Oct 2019 21:46:22 +0200 Message-Id: <20191001194715.2796-15-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 01 Oct 2019 19:47:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Set unsupported_imgopts as appropriate for all tests that should make use of it. Signed-off-by: Max Reitz --- tests/qemu-iotests/044 | 5 ++++- tests/qemu-iotests/057 | 4 +++- tests/qemu-iotests/065 | 4 +++- tests/qemu-iotests/163 | 5 ++++- tests/qemu-iotests/165 | 4 +++- tests/qemu-iotests/196 | 4 +++- tests/qemu-iotests/206 | 5 ++++- tests/qemu-iotests/222 | 3 ++- tests/qemu-iotests/237 | 4 +++- tests/qemu-iotests/242 | 4 +++- tests/qemu-iotests/245 | 4 +++- tests/qemu-iotests/246 | 5 ++++- tests/qemu-iotests/248 | 6 +++++- tests/qemu-iotests/254 | 4 +++- tests/qemu-iotests/257 | 4 +++- 15 files changed, 50 insertions(+), 15 deletions(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 8b2afa2a11..97ba98e628 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -116,4 +116,7 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # These refcount calculations do not work with data_file = or + # with any refcount width but the default (of 16) + unsupported_imgopts=3D['data_file', 'refcount_bits']) diff --git a/tests/qemu-iotests/057 b/tests/qemu-iotests/057 index 9fbba759b6..f5aa5929dc 100755 --- a/tests/qemu-iotests/057 +++ b/tests/qemu-iotests/057 @@ -257,4 +257,6 @@ class TestSnapshotDelete(ImageSnapshotTestCase): =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # Snapshots do not work with data_file + unsupported_imgopts=3D['data_file']) diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 index 5b21eb96bd..9db9552784 100755 --- a/tests/qemu-iotests/065 +++ b/tests/qemu-iotests/065 @@ -130,4 +130,6 @@ TestQMP =3D None =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # Neither of these options would work with compat=3D0.10 + unsupported_imgopts=3D['refcount_bits', 'data_file']) diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 index d94728e080..92633f1b21 100755 --- a/tests/qemu-iotests/163 +++ b/tests/qemu-iotests/163 @@ -168,4 +168,7 @@ ShrinkBaseClass =3D None =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['raw', 'qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # We want to set our own refcount_bits, and that will + # not work with compat=3D0.10 + unsupported_imgopts=3D['refcount_bits', 'compat=3D0.10']) diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165 index 5650dc7c87..97dd7102c3 100755 --- a/tests/qemu-iotests/165 +++ b/tests/qemu-iotests/165 @@ -104,4 +104,6 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase): =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # compat=3D1.1 is needed for dirty bitmaps + unsupported_imgopts=3D['compat=3D0.10']) diff --git a/tests/qemu-iotests/196 b/tests/qemu-iotests/196 index 92fe9244f8..ec4852a19c 100755 --- a/tests/qemu-iotests/196 +++ b/tests/qemu-iotests/196 @@ -64,4 +64,6 @@ class TestInvalidateAutoclear(iotests.QMPTestCase): =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # compat=3D1.1 is needed for autoclear flags + unsupported_imgopts=3D['compat=3D0.10']) diff --git a/tests/qemu-iotests/206 b/tests/qemu-iotests/206 index 23ff2f624b..91dd6ee176 100755 --- a/tests/qemu-iotests/206 +++ b/tests/qemu-iotests/206 @@ -23,7 +23,10 @@ import iotests from iotests import imgfmt =20 -iotests.script_initialize(supported_fmts=3D['qcow2']) +iotests.script_initialize(supported_fmts=3D['qcow2'], + # All options are ignored + unsupported_imgopts=3D['compat=3D0.10', 'refcoun= t_bits', + 'data_file']) =20 def blockdev_create(vm, options): result =3D vm.qmp_log('blockdev-create', diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222 index 6788979ed3..ffa88d4bb9 100644 --- a/tests/qemu-iotests/222 +++ b/tests/qemu-iotests/222 @@ -25,7 +25,8 @@ import iotests from iotests import log, qemu_img, qemu_io, qemu_io_silent =20 iotests.script_initialize(supported_fmts=3D['qcow2', 'qcow', 'qed', 'vmdk', - 'vhdx', 'raw']) + 'vhdx', 'raw'], + unsupported_imgopts=3D['streamOptimized']) =20 patterns =3D [("0x5d", "0", "64k"), ("0xd5", "1M", "64k"), diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237 index 3758ace0bc..34ff4b55db 100755 --- a/tests/qemu-iotests/237 +++ b/tests/qemu-iotests/237 @@ -24,7 +24,9 @@ import math import iotests from iotests import imgfmt =20 -iotests.script_initialize(supported_fmts=3D['vmdk']) +iotests.script_initialize(supported_fmts=3D['vmdk'], + # All options are ignored + unsupported_imgopts=3D['subformat']) =20 def blockdev_create(vm, options): result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions, diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 index 21f69a0d2c..333fb8b56c 100755 --- a/tests/qemu-iotests/242 +++ b/tests/qemu-iotests/242 @@ -24,7 +24,9 @@ import struct from iotests import qemu_img_create, qemu_io, qemu_img_pipe, \ file_path, img_info_log, log, filter_qemu_io =20 -iotests.script_initialize(supported_fmts=3D['qcow2']) +iotests.script_initialize(supported_fmts=3D['qcow2'], + # compat=3D1.1 is needed for dirty bitmaps + unsupported_imgopts=3D['compat=3D0.10']) =20 disk =3D file_path('disk') chunk =3D 256 * 1024 diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 50544a7836..72ab2a248d 100644 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -1002,4 +1002,6 @@ class TestBlockdevReopen(iotests.QMPTestCase): if __name__ =3D=3D '__main__': iotests.activate_logging() iotests.main(supported_fmts=3D["qcow2"], - supported_protocols=3D["file"]) + supported_protocols=3D["file"], + # reopen options differ with an external data file + unsupported_imgopts=3D['data_file']) diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246 index 1d7747d62d..d1364d5901 100755 --- a/tests/qemu-iotests/246 +++ b/tests/qemu-iotests/246 @@ -22,7 +22,10 @@ import iotests from iotests import log =20 -iotests.script_initialize(supported_fmts=3D['qcow2']) +iotests.script_initialize(supported_fmts=3D['qcow2'], + # compat=3D1.1 is needed for dirty bitmaps + unsupported_imgopts=3D['compat=3D0.10']) + size =3D 64 * 1024 * 1024 * 1024 gran_small =3D 32 * 1024 gran_large =3D 128 * 1024 diff --git a/tests/qemu-iotests/248 b/tests/qemu-iotests/248 index 781b21b227..0adc4da802 100755 --- a/tests/qemu-iotests/248 +++ b/tests/qemu-iotests/248 @@ -21,7 +21,11 @@ import iotests from iotests import qemu_img_create, qemu_io, file_path, filter_qmp_testfi= les =20 -iotests.script_initialize(supported_fmts=3D['qcow2']) +iotests.script_initialize(supported_fmts=3D['qcow2'], + # With an external data file, we would need + # to impose the limit on @data-file instead + # of @file + unsupported_imgopts=3D['data_file']) =20 source, target =3D file_path('source', 'target') size =3D 5 * 1024 * 1024 diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254 index 43b40f4f71..0404faf853 100755 --- a/tests/qemu-iotests/254 +++ b/tests/qemu-iotests/254 @@ -21,7 +21,9 @@ import iotests from iotests import qemu_img_create, file_path, log =20 -iotests.script_initialize(supported_fmts=3D['qcow2']) +iotests.script_initialize(supported_fmts=3D['qcow2'], + # compat=3D1.1 is needed for dirty bitmaps + unsupported_imgopts=3D['compat=3D0.10']) =20 disk, top =3D file_path('disk', 'top') size =3D 1024 * 1024 diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index de8b45f094..82c10e9b52 100755 --- a/tests/qemu-iotests/257 +++ b/tests/qemu-iotests/257 @@ -526,4 +526,6 @@ def main(): =20 if __name__ =3D=3D '__main__': iotests.script_main(main, supported_fmts=3D['qcow2'], - supported_protocols=3D['file']) + supported_protocols=3D['file'], + # blkdebug does not work with an external data file + unsupported_imgopts=3D['data_file']) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960990; cv=none; d=zoho.com; s=zohoarc; b=Rlj+IiUuF5mNhVdJkq8PH2VVX9Jd45P1/Xp/JkmjkEdsWgA4YO4Xm1wpbRe09g3/ZST/oR0JKFAvDJF+3k34ZtcBEnlQXTlAad5JysSW+272d+HUoe+GCPOlKA17XejxOuAAoIDRTwR+1NsZC37sDG64jI/6u5Lwxe+8CebnzdM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960990; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ap7+vROnDAJqfLH//SscW0ek0Nqd0gD0bcEK2JCahIY=; b=EMv13agSiFESAOJOCkQwjIGyCWtGCSxApFQ5738QbpHRYi6aWGsfJPn1TGi0/JLKXpmB7bCcj117KYNkhimrMSymhAlQOvIaq/80TddAkz5oFhuKtG5pnqzXq7b/bBMF1a/s6wjZLahTILDJTLoo9El93inTUJxqrdThkc+Hkcw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960990729197.23846649421; Tue, 1 Oct 2019 13:16:30 -0700 (PDT) Received: from localhost ([::1]:47764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOZN-0003eQ-Uq for importer@patchew.org; Tue, 01 Oct 2019 16:16:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54282) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7r-0004fk-SN for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7q-0007v4-8b for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:47:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44062) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7m-0007qu-42; Tue, 01 Oct 2019 15:47:54 -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 244E6302C084; Tue, 1 Oct 2019 19:47:53 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 858A65D9C9; Tue, 1 Oct 2019 19:47:52 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 15/67] iotests/030: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:23 +0200 Message-Id: <20191001194715.2796-16-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 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.46]); Tue, 01 Oct 2019 19:47:53 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/030 | 69 ++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 01aa96ed16..cddb017496 100755 --- a/tests/qemu-iotests/030 +++ b/tests/qemu-iotests/030 @@ -21,7 +21,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_io =20 backing_img =3D os.path.join(iotests.test_dir, 'backing.img') mid_img =3D os.path.join(iotests.test_dir, 'mid.img') @@ -32,8 +32,8 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def setUp(self): iotests.create_image(backing_img, TestSingleDrive.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, mid_img) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % mid_img, test_img) + create_test_image(mid_img, backing_file=3Dbacking_img) + create_test_image(test_img, backing_file=3Dmid_img) qemu_io('-f', 'raw', '-c', 'write -P 0x1 0 512', backing_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 524288 512', mid= _img) self.vm =3D iotests.VM().add_drive("blkdebug::" + test_img, @@ -43,8 +43,8 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(mid_img) + remove_test_image(test_img) + remove_test_image(mid_img) os.remove(backing_img) =20 def test_stream(self): @@ -155,9 +155,8 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def test_read_only(self): # Create a new file that we can attach (we need a read-only top) - with iotests.FilePath('ro-top.img') as ro_top_path: - qemu_img('create', '-f', iotests.imgfmt, ro_top_path, - str(self.image_len)) + with iotests.ImagePath('ro-top.img') as ro_top_path: + create_test_image(ro_top_path, self.image_len) =20 result =3D self.vm.qmp('blockdev-add', node_name=3D'ro-top', @@ -198,8 +197,7 @@ class TestParallelOps(iotests.QMPTestCase): # Create all images iotests.create_image(self.imgs[0], self.image_len) for i in range(1, self.num_imgs): - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'backing_file=3D%s' % self.imgs[i-1], self.imgs= [i]) + create_test_image(self.imgs[i], backing_file=3Dself.imgs[i - 1= ]) =20 # Put data into the images we are copying data from odd_img_indexes =3D [x for x in reversed(range(self.num_imgs)) if = x % 2 =3D=3D 1] @@ -219,7 +217,7 @@ class TestParallelOps(iotests.QMPTestCase): def tearDown(self): self.vm.shutdown() for img in self.imgs: - os.remove(img) + remove_test_image(img) =20 # Test that it's possible to run several block-stream operations # in parallel in the same snapshot chain @@ -539,11 +537,10 @@ class TestQuorum(iotests.QMPTestCase): backing_img =3D os.path.join(iotests.test_dir, 'backing-%d.img= ' % i) self.children.append(child_img) self.backing.append(backing_img) - qemu_img('create', '-f', iotests.imgfmt, backing_img, '1M') + create_test_image(backing_img, '1M') qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x55 0 1024', backing_img) - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'backing_file=3D%s' % backing_img, child_img) + create_test_image(child_img, backing_file=3Dbacking_img) opts.append("children.%d.file.filename=3D%s" % (i, child_img)) opts.append("children.%d.node-name=3Dnode%d" % (i, i)) =20 @@ -555,9 +552,9 @@ class TestQuorum(iotests.QMPTestCase): def tearDown(self): self.vm.shutdown() for img in self.children: - os.remove(img) + remove_test_image(img) for img in self.backing: - os.remove(img) + remove_test_image(img) =20 def test_stream_quorum(self): if not iotests.supports_quorum(): @@ -587,7 +584,7 @@ class TestSmallerBackingFile(iotests.QMPTestCase): =20 def setUp(self): iotests.create_image(backing_img, self.backing_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img, str(self.image_len)) + create_test_image(test_img, self.image_len, backing_file=3Dbacking= _img) self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 @@ -638,16 +635,15 @@ class TestEIO(TestErrors): self.blkdebug_file =3D backing_img + ".blkdebug" iotests.create_image(backing_img, TestErrors.image_len) self.create_blkdebug_file(self.blkdebug_file, "read_aio", 5) - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'backing_file=3Dblkdebug:%s:%s,backing_fmt=3Draw' - % (self.blkdebug_file, backing_img), - test_img) + create_test_image(test_img, backing_fmt=3D'raw', + backing_file=3D('blkdebug:%s:%s' % (self.blkdebu= g_file, + backing_img))) self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) os.remove(backing_img) os.remove(self.blkdebug_file) =20 @@ -788,16 +784,15 @@ class TestENOSPC(TestErrors): self.blkdebug_file =3D backing_img + ".blkdebug" iotests.create_image(backing_img, TestErrors.image_len) self.create_blkdebug_file(self.blkdebug_file, "read_aio", 28) - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'backing_file=3Dblkdebug:%s:%s,backing_fmt=3Draw' - % (self.blkdebug_file, backing_img), - test_img) + create_test_image(test_img, backing_fmt=3D'raw', + backing_file=3D('blkdebug:%s:%s' % (self.blkdebu= g_file, + backing_img))) self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) os.remove(backing_img) os.remove(self.blkdebug_file) =20 @@ -848,17 +843,17 @@ class TestStreamStop(iotests.QMPTestCase): image_len =3D 8 * 1024 * 1024 * 1024 # GB =20 def setUp(self): - qemu_img('create', backing_img, str(TestStreamStop.image_len)) - qemu_io('-f', 'raw', '-c', 'write -P 0x1 0 32M', backing_img) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(backing_img, TestStreamStop.image_len) + qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 0 32M', backing_= img) + create_test_image(test_img, backing_file=3Dbacking_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 32M 32M', test_i= mg) self.vm =3D iotests.VM().add_drive("blkdebug::" + test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(backing_img) + remove_test_image(test_img) + remove_test_image(backing_img) =20 def test_stream_stop(self): self.assert_no_active_block_jobs() @@ -879,17 +874,17 @@ class TestSetSpeed(iotests.QMPTestCase): image_len =3D 80 * 1024 * 1024 # MB =20 def setUp(self): - qemu_img('create', backing_img, str(TestSetSpeed.image_len)) - qemu_io('-f', 'raw', '-c', 'write -P 0x1 0 32M', backing_img) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(backing_img, TestSetSpeed.image_len) + qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 0 32M', backing_= img) + create_test_image(test_img, backing_file=3Dbacking_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 32M 32M', test_i= mg) self.vm =3D iotests.VM().add_drive('blkdebug::' + test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(backing_img) + remove_test_image(test_img) + remove_test_image(backing_img) =20 # This is a short performance test which is not run by default. # Invoke "IMGFMT=3Dqed ./030 TestSetSpeed.perf_test_throughput" --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961378; cv=none; d=zoho.com; s=zohoarc; b=WumOSwwjfJhCbZwlE7qFUAt9L1+ZOp8US/zfs7C3HTklFSBWWxqGsQ4aZbhlld/35Kfn3uZ7oqNGIlnxVuNsFc7ul+4UWt9FNdJFbext+ZZ66LgDIFEquVSGnatHmimm+25FyUFeZQRTzhRbEdY7Q7fumlPiLgN2Zq3d3j033sI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961378; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OvkhLEaJwB0kUgAcl7Qg1PNsOizuiLcNCxKwTW83CNY=; b=KXXXHW82yULJ7AJaamxcu5ehTJ1HLvgMApGg9jgD65k8DSwfSJKduPSCoWZdBWdd5mEODl5i6w16CCbkiHkxRtj92hXnCnk/BgbkbcA0wGRW/YEMAEwXMhQ/N8+I+f3m+MxbYoOFZYlbxWsrEv3D0auQE3YiNrVs3OxqSxxbA2U= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961378202319.65137363904626; Tue, 1 Oct 2019 13:22:58 -0700 (PDT) Received: from localhost ([::1]:47804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOfg-0000iy-3T for importer@patchew.org; Tue, 01 Oct 2019 16:22:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54295) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7t-0004gk-RC for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7r-0007vh-DU for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52196) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7o-0007tB-6i; Tue, 01 Oct 2019 15:47:56 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EB3BC04AC69; Tue, 1 Oct 2019 19:47:55 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 070025D6D0; Tue, 1 Oct 2019 19:47:54 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 16/67] iotests/040: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:24 +0200 Message-Id: <20191001194715.2796-17-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 01 Oct 2019 19:47:55 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/040 | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 762ad1ebcb..9584eeeb1f 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -24,7 +24,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_img, qemu_io import struct import errno =20 @@ -80,8 +80,8 @@ class TestSingleDrive(ImageCommitTestCase): =20 def setUp(self): iotests.create_image(backing_img, self.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, mid_img) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % mid_img, test_img) + create_test_image(mid_img, backing_file=3Dbacking_img) + create_test_image(test_img, backing_file=3Dmid_img) qemu_io('-f', 'raw', '-c', 'write -P 0xab 0 524288', backing_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xef 524288 524288',= mid_img) self.vm =3D iotests.VM().add_drive(test_img, "node-name=3Dtop,back= ing.node-name=3Dmid,backing.backing.node-name=3Dbase", interface=3D"none") @@ -92,8 +92,8 @@ class TestSingleDrive(ImageCommitTestCase): =20 def tearDown(self): self.vm.shutdown(has_quit=3Dself.has_quit) - os.remove(test_img) - os.remove(mid_img) + remove_test_image(test_img) + remove_test_image(mid_img) os.remove(backing_img) =20 def test_commit(self): @@ -303,8 +303,8 @@ class TestRelativePaths(ImageCommitTestCase): if exception.errno !=3D errno.EEXIST: raise iotests.create_image(self.backing_img_abs, TestRelativePaths.image= _len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % self.backing_img_abs, self.mid_img_abs) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % self.mid_img_abs, self.test_img) + create_test_image(self.mid_img_abs, backing_file=3Dself.backing_im= g_abs) + create_test_image(self.test_img, backing_file=3Dself.mid_img_abs) qemu_img('rebase', '-u', '-b', self.backing_img, self.mid_img_abs) qemu_img('rebase', '-u', '-b', self.mid_img, self.test_img) qemu_io('-f', 'raw', '-c', 'write -P 0xab 0 524288', self.backing_= img_abs) @@ -314,8 +314,8 @@ class TestRelativePaths(ImageCommitTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(self.test_img) - os.remove(self.mid_img_abs) + remove_test_image(self.test_img) + remove_test_image(self.mid_img_abs) os.remove(self.backing_img_abs) try: os.rmdir(os.path.join(iotests.test_dir, self.dir1)) @@ -368,9 +368,9 @@ class TestSetSpeed(ImageCommitTestCase): image_len =3D 80 * 1024 * 1024 # MB =20 def setUp(self): - qemu_img('create', backing_img, str(TestSetSpeed.image_len)) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, mid_img) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % mid_img, test_img) + create_test_image(backing_img, TestSetSpeed.image_len) + create_test_image(mid_img, backing_file=3Dbacking_img) + create_test_image(test_img, backing_file=3Dmid_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 0 512', test_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xef 524288 524288',= mid_img) self.vm =3D iotests.VM().add_drive('blkdebug::' + test_img) @@ -378,9 +378,9 @@ class TestSetSpeed(ImageCommitTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(mid_img) - os.remove(backing_img) + remove_test_image(test_img) + remove_test_image(mid_img) + remove_test_image(backing_img) =20 def test_set_speed(self): self.assert_no_active_block_jobs() @@ -408,9 +408,9 @@ class TestReopenOverlay(ImageCommitTestCase): =20 def setUp(self): iotests.create_image(self.img0, self.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % self.img0, self.img1) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % self.img1, self.img2) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % self.img2, self.img3) + create_test_image(self.img1, backing_file=3Dself.img0) + create_test_image(self.img2, backing_file=3Dself.img1) + create_test_image(self.img3, backing_file=3Dself.img2) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xab 0 128K', self.i= mg1) self.vm =3D iotests.VM().add_drive(self.img3) self.vm.launch() @@ -418,9 +418,9 @@ class TestReopenOverlay(ImageCommitTestCase): def tearDown(self): self.vm.shutdown() os.remove(self.img0) - os.remove(self.img1) - os.remove(self.img2) - os.remove(self.img3) + remove_test_image(self.img1) + remove_test_image(self.img2) + remove_test_image(self.img3) =20 # This tests what happens when the overlay image of the 'top' node # needs to be reopened in read-write mode in order to update the --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960482; cv=none; d=zoho.com; s=zohoarc; b=RCucuCEX5aTWkIjmybAsVOJpLysA3daAvsqfIFKcuVBfcEWWallGaQyg5nSiqKGJBaF4+ofSFwHCyxJnh0NIEHSHxDHpJTAFnpWETOf5iykGRiiyZ2Kgd1po7OoUYMo02wdCn/d8x0fdblTMB2TcIZyeannQ7ImhUooT/kIcY90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960482; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qXqw8lvoda5WHLAZREMVWPqRvxfNSUhmoMbvwCRVsjo=; b=CaP9Boi3AWsjku9oTMsxWcjtPM6U7YQrr3qTNep9NKVpCXgJyGXjrMxjN2aS/FZhy9Keuj1wp76AyUH0H1CXU201HSXURID1AX2mpFw8TKm/HsOdzN4GF9KUairzVLWSap8zK/wq2y7DLHcrh815Pfy/GIJcJHtLDCEolTX3DF4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960482741141.7476825659461; Tue, 1 Oct 2019 13:08:02 -0700 (PDT) Received: from localhost ([::1]:47694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFORE-0004il-KB for importer@patchew.org; Tue, 01 Oct 2019 16:08:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54365) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7y-0004mz-4B for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7w-0007xw-21 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51804) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7q-0007us-MN; Tue, 01 Oct 2019 15:47:58 -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 E4D48A44AF8; Tue, 1 Oct 2019 19:47:57 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F0835D9C9; Tue, 1 Oct 2019 19:47:57 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 17/67] iotests/041: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:25 +0200 Message-Id: <20191001194715.2796-18-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Tue, 01 Oct 2019 19:47:57 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 108 +++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 57 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 8568426311..5cf2e2cb52 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -21,7 +21,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_img, qemu_io =20 backing_img =3D os.path.join(iotests.test_dir, 'backing.img') target_backing_img =3D os.path.join(iotests.test_dir, 'target-backing.img') @@ -41,7 +41,7 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def setUp(self): iotests.create_image(backing_img, self.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(test_img, backing_file=3Dbacking_img) self.vm =3D iotests.VM().add_drive(test_img, "node-name=3Dtop,back= ing.node-name=3Dbase") if iotests.qemu_default_machine =3D=3D 'pc': self.vm.add_drive(None, 'media=3Dcdrom', 'ide') @@ -49,12 +49,9 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) os.remove(backing_img) - try: - os.remove(target_img) - except OSError: - pass + remove_test_image(target_img) =20 def test_complete(self): self.assert_no_active_block_jobs() @@ -138,8 +135,8 @@ class TestSingleDrive(iotests.QMPTestCase): def test_small_buffer2(self): self.assert_no_active_block_jobs() =20 - qemu_img('create', '-f', iotests.imgfmt, '-o', 'cluster_size=3D%d,= size=3D%d' - % (self.image_len, self.image_len), target_img) + create_test_image(target_img, self.image_len, + opts=3D['cluster_size=3D%d' % self.image_len]) result =3D self.vm.qmp(self.qmp_cmd, device=3D'drive0', sync=3D'fu= ll', buf_size=3D65536, mode=3D'existing', target= =3Dself.qmp_target) self.assert_qmp(result, 'return', {}) @@ -154,8 +151,8 @@ class TestSingleDrive(iotests.QMPTestCase): def test_large_cluster(self): self.assert_no_active_block_jobs() =20 - qemu_img('create', '-f', iotests.imgfmt, '-o', 'cluster_size=3D%d,= backing_file=3D%s' - % (self.image_len, backing_img), target_img) + create_test_image(target_img, backing_file=3Dbacking_img, + opts=3D['cluster_size=3D%d' % self.image_len]) result =3D self.vm.qmp(self.qmp_cmd, device=3D'drive0', sync=3D'fu= ll', mode=3D'existing', target=3Dself.qmp_target) self.assert_qmp(result, 'return', {}) @@ -227,7 +224,7 @@ class TestSingleBlockdev(TestSingleDrive): =20 def setUp(self): TestSingleDrive.setUp(self) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, target_img) + create_test_image(target_img, backing_file=3Dbacking_img) args =3D {'driver': iotests.imgfmt, 'node-name': self.qmp_target, 'file': { 'filename': target_img, 'driver': 'file' } } @@ -265,24 +262,21 @@ class TestMirrorNoBacking(iotests.QMPTestCase): =20 def setUp(self): iotests.create_image(backing_img, TestMirrorNoBacking.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(test_img, backing_file=3Dbacking_img) self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) os.remove(backing_img) - try: - os.remove(target_backing_img) - except: - pass - os.remove(target_img) + remove_test_image(target_backing_img) + remove_test_image(target_img) =20 def test_complete(self): self.assert_no_active_block_jobs() =20 - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, target_img) + create_test_image(target_img, backing_file=3Dbacking_img) result =3D self.vm.qmp('drive-mirror', device=3D'drive0', sync=3D'= full', mode=3D'existing', target=3Dtarget_img) self.assert_qmp(result, 'return', {}) @@ -297,7 +291,7 @@ class TestMirrorNoBacking(iotests.QMPTestCase): def test_cancel(self): self.assert_no_active_block_jobs() =20 - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, target_img) + create_test_image(target_img, backing_file=3Dbacking_img) result =3D self.vm.qmp('drive-mirror', device=3D'drive0', sync=3D'= full', mode=3D'existing', target=3Dtarget_img) self.assert_qmp(result, 'return', {}) @@ -313,10 +307,9 @@ class TestMirrorNoBacking(iotests.QMPTestCase): self.assert_no_active_block_jobs() =20 # qemu-img create fails if the image is not there - qemu_img('create', '-f', iotests.imgfmt, '-o', 'size=3D%d' - %(TestMirrorNoBacking.image_len), target_backing_i= mg) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'cluster_size=3D%d,= backing_file=3D%s' - % (TestMirrorNoBacking.image_len, target_backing_i= mg), target_img) + create_test_image(target_backing_img, TestMirrorNoBacking.image_le= n) + create_test_image(target_img, backing_file=3Dtarget_backing_img, + opts=3D['cluster_size=3D%d' % TestMirrorNoBackin= g.image_len]) =20 result =3D self.vm.qmp('drive-mirror', device=3D'drive0', sync=3D'= full', mode=3D'existing', target=3Dtarget_img) @@ -335,14 +328,14 @@ class TestMirrorResized(iotests.QMPTestCase): =20 def setUp(self): iotests.create_image(backing_img, TestMirrorResized.backing_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(test_img, backing_file=3Dbacking_img) qemu_img('resize', test_img, '2M') self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) os.remove(backing_img) try: os.remove(target_img) @@ -407,14 +400,15 @@ new_state =3D "1" ''' % (event, errno, self.MIRROR_GRANULARITY // 512, event, event)) file.close() =20 + # blkdebug does not work with an external data file + @iotests.skip_for_imgopts(['data_file']) def setUp(self): self.blkdebug_file =3D backing_img + ".blkdebug" iotests.create_image(backing_img, TestReadErrors.image_len) self.create_blkdebug_file(self.blkdebug_file, "read_aio", 5) - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'backing_file=3Dblkdebug:%s:%s,backing_fmt=3Draw' - % (self.blkdebug_file, backing_img), - test_img) + create_test_image(test_img, backing_fmt=3D'raw', + backing_file=3D('blkdebug:%s:%s' % (self.blkdebu= g_file, + backing_img))) # Write something for tests that use sync=3D'top' qemu_io('-c', 'write %d 512' % (self.MIRROR_GRANULARITY + 65536), test_img) @@ -423,8 +417,8 @@ new_state =3D "1" =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(target_img) + remove_test_image(test_img) + remove_test_image(target_img) os.remove(backing_img) os.remove(self.blkdebug_file) =20 @@ -483,7 +477,8 @@ new_state =3D "1" # Test COW into the target image. The first half of the # cluster at MIRROR_GRANULARITY has to be copied from # backing_img, even though sync=3D'top'. - qemu_img('create', '-f', iotests.imgfmt, '-ocluster_size=3D131072,= backing_file=3D%s' %(backing_img), target_img) + create_test_image(target_img, backing_file=3Dbacking_img, + opts=3D['cluster_size=3D131072']) result =3D self.vm.qmp('drive-mirror', device=3D'drive0', sync=3D'= top', on_source_error=3D'ignore', mode=3D'existing', target=3Dtarget_img) @@ -572,20 +567,22 @@ new_state =3D "1" ''' % (event, errno, self.MIRROR_GRANULARITY // 512, event, event)) file.close() =20 + # blkdebug does not work with an external data file + @iotests.skip_for_imgopts(['data_file']) def setUp(self): self.blkdebug_file =3D target_img + ".blkdebug" iotests.create_image(backing_img, TestWriteErrors.image_len) self.create_blkdebug_file(self.blkdebug_file, "write_aio", 5) - qemu_img('create', '-f', iotests.imgfmt, '-obacking_file=3D%s' %(b= acking_img), test_img) + create_test_image(test_img, backing_file=3Dbacking_img) self.vm =3D iotests.VM().add_drive(test_img) self.target_img =3D 'blkdebug:%s:%s' % (self.blkdebug_file, target= _img) - qemu_img('create', '-f', iotests.imgfmt, '-osize=3D%d' %(TestWrite= Errors.image_len), target_img) + create_test_image(target_img, TestWriteErrors.image_len) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(target_img) + remove_test_image(test_img) + remove_test_image(target_img) os.remove(backing_img) os.remove(self.blkdebug_file) =20 @@ -673,15 +670,15 @@ class TestSetSpeed(iotests.QMPTestCase): image_len =3D 80 * 1024 * 1024 # MB =20 def setUp(self): - qemu_img('create', backing_img, str(TestSetSpeed.image_len)) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(backing_img, TestSetSpeed.image_len) + create_test_image(test_img, backing_file=3Dbacking_img) self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(backing_img) + remove_test_image(test_img) + remove_test_image(backing_img) os.remove(target_img) =20 def test_set_speed(self): @@ -739,8 +736,7 @@ class TestUnbackedSource(iotests.QMPTestCase): image_len =3D 2 * 1024 * 1024 # MB =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, test_img, - str(TestUnbackedSource.image_len)) + create_test_image(test_img, TestUnbackedSource.image_len) self.vm =3D iotests.VM() self.vm.launch() result =3D self.vm.qmp('blockdev-add', node_name=3D'drive0', @@ -753,8 +749,8 @@ class TestUnbackedSource(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) - os.remove(target_img) + remove_test_image(test_img) + remove_test_image(target_img) =20 def test_absolute_paths_full(self): self.assert_no_active_block_jobs() @@ -784,8 +780,7 @@ class TestUnbackedSource(iotests.QMPTestCase): self.assert_no_active_block_jobs() =20 def test_existing_full(self): - qemu_img('create', '-f', iotests.imgfmt, target_img, - str(self.image_len)) + create_test_image(target_img, self.image_len) qemu_io('-c', 'write -P 42 0 64k', target_img) =20 self.assert_no_active_block_jobs() @@ -802,8 +797,7 @@ class TestUnbackedSource(iotests.QMPTestCase): 'target image does not match source after mirrorin= g') =20 def test_blockdev_full(self): - qemu_img('create', '-f', iotests.imgfmt, target_img, - str(self.image_len)) + create_test_image(target_img, self.image_len) qemu_io('-c', 'write -P 42 0 64k', target_img) =20 result =3D self.vm.qmp('blockdev-add', node_name=3D'target', @@ -834,8 +828,7 @@ class TestGranularity(iotests.QMPTestCase): image_len =3D 10 * 1024 * 1024 # MB =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, test_img, - str(TestGranularity.image_len)) + create_test_image(test_img, TestGranularity.image_len) qemu_io('-c', 'write 0 %d' % (self.image_len), test_img) self.vm =3D iotests.VM().add_drive(test_img) @@ -845,7 +838,7 @@ class TestGranularity(iotests.QMPTestCase): self.vm.shutdown() self.assertTrue(iotests.compare_images(test_img, target_img), 'target image does not match source after mirrorin= g') - os.remove(test_img) + remove_test_image(test_img) os.remove(target_img) =20 def test_granularity(self): @@ -879,8 +872,7 @@ class TestRepairQuorum(iotests.QMPTestCase): =20 # Add each individual quorum images for i in self.IMAGES: - qemu_img('create', '-f', iotests.imgfmt, i, - str(TestSingleDrive.image_len)) + create_test_image(i, TestSingleDrive.image_len) # Assign a node name to each quorum image in order to manipula= te # them opts =3D "node-name=3Dimg%i" % self.IMAGES.index(i) @@ -898,8 +890,10 @@ class TestRepairQuorum(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - for i in self.IMAGES + [ quorum_repair_img, quorum_snapshot_file ]: - # Do a try/except because the test may have deleted some images + for i in self.IMAGES: + remove_test_image(i) + + for i in [ quorum_repair_img, quorum_snapshot_file ]: try: os.remove(i) except OSError: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961469; cv=none; d=zoho.com; s=zohoarc; b=Z89UcaLyHLLMosNm+vQLgqV/pCMgQnnltoMeZyS2sYGrpLrqGMO37WgCw/+tZYonEmjrJiG62gNPXbpXoUjYgF2aoxHUdWq1g169obZN1EfCNWLOj81WgmLaEyL+z7GfqrLDPaffEATdxwH9YOPCYqr3VZeauMnB9AN4WG19oxc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961469; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=zLkvC0MzkOplYU7C2h+jgSnz8nmXu06X9Hi2tJ5SeJM=; b=jFVTsHiBsFGiQ/bHyiEzH9W52vV9FeJPRo5DW21ISOEBzFflR33DES2HRrNCXTRPl5pBRdflTxBl/x3Pp/bw7UnIAi3cCMHLPt3kIPhU1DyAMwmO63fIQWDi/zbm/TcMViwGPb+i5Ddoe1Irh0qi0gnGiijqYv5LZOiK9aXEvWE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961469679640.3834953085885; Tue, 1 Oct 2019 13:24:29 -0700 (PDT) Received: from localhost ([::1]:47810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOh7-0001y6-W6 for importer@patchew.org; Tue, 01 Oct 2019 16:24:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54333) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7w-0004kY-5z for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7v-0007xS-4l for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7t-0007wJ-1V; Tue, 01 Oct 2019 15:48:01 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34B8F81DE1; Tue, 1 Oct 2019 19:48:00 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C403B19C6A; Tue, 1 Oct 2019 19:47:59 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 18/67] iotests/044: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:26 +0200 Message-Id: <20191001194715.2796-19-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 01 Oct 2019 19:48:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/044 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 97ba98e628..a5e13751e1 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -23,7 +23,7 @@ import os import qcow2 from qcow2 import QcowHeader import iotests -from iotests import qemu_img, qemu_img_verbose, qemu_io +from iotests import create_test_image, remove_test_image, qemu_img_verbose= , qemu_io import struct import subprocess import sys @@ -100,13 +100,13 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): =20 =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, '-o', 'cluster_size=3D512= ', test_img, '16G') + create_test_image(test_img, '16G', opts=3D['cluster_size=3D512']) self.preallocate(test_img) pass =20 =20 def tearDown(self): - os.remove(test_img) + remove_test_image(test_img) pass =20 def test_grow_refcount_table(self): --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961732; cv=none; d=zoho.com; s=zohoarc; b=fLh0NdaGNGGKaK2ZCX3j7bz4hnYC4WwtV1LDoCjxxnUn8TOtfAGooA1RbUAahxg+aSFcz/VhCjkymoVhp0yIgshfKADf0Rpkr1p61rYKG4CEs7wUKK1d+Ky5ciMG694lXlaNt+MhTdLC1HFfHBvy7Sxfjam42NxqiJ7pHvn0CY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961732; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jooR8fRScxFQ/Q4nPVifW42Bp3ZLgoMe5vAVrbPzXQM=; b=cpPIwVTE9jtq8DNQaXBWFbu2In39mE39EqTSPZu6W0oewoOnOvY0iak49d00AUqKbm3cUSVO5hfF+DgiJXZZrJIi3q6RVo+ohklQiZhrmwX8E6yXUG7nUURkM9uAaQvTcHAgvXGuasrkwdeaBVyAc6eOs60J/iMvk5v5nKxl0bs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961732729875.3845610002284; Tue, 1 Oct 2019 13:28:52 -0700 (PDT) Received: from localhost ([::1]:47848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOlM-0005zg-7y for importer@patchew.org; Tue, 01 Oct 2019 16:28:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54375) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO7y-0004nl-RA for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO7x-0007yj-L0 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7v-0007xH-7H; Tue, 01 Oct 2019 15:48:03 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AAB12BF7B; Tue, 1 Oct 2019 19:48:02 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 14D513D8F; Tue, 1 Oct 2019 19:48:01 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 19/67] iotests/045: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:27 +0200 Message-Id: <20191001194715.2796-20-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 01 Oct 2019 19:48:02 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/045 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/qemu-iotests/045 b/tests/qemu-iotests/045 index 01cc038884..781ceb8d19 100755 --- a/tests/qemu-iotests/045 +++ b/tests/qemu-iotests/045 @@ -20,7 +20,7 @@ =20 import os import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 image0 =3D os.path.join(iotests.test_dir, 'image0') image1 =3D os.path.join(iotests.test_dir, 'image1') @@ -32,11 +32,11 @@ class TestFdSets(iotests.QMPTestCase): =20 def setUp(self): self.vm =3D iotests.VM() - qemu_img('create', '-f', iotests.imgfmt, image0, '128K') - qemu_img('create', '-f', iotests.imgfmt, image1, '128K') - qemu_img('create', '-f', iotests.imgfmt, image2, '128K') - qemu_img('create', '-f', iotests.imgfmt, image3, '128K') - qemu_img('create', '-f', iotests.imgfmt, image4, '128K') + create_test_image(image0, '128K') + create_test_image(image1, '128K') + create_test_image(image2, '128K') + create_test_image(image3, '128K') + create_test_image(image4, '128K') self.file0 =3D open(image0, 'r') self.file1 =3D open(image1, 'w+') self.file2 =3D open(image2, 'r') @@ -57,11 +57,11 @@ class TestFdSets(iotests.QMPTestCase): self.file2.close() self.file3.close() self.file4.close() - os.remove(image0) - os.remove(image1) - os.remove(image2) - os.remove(image3) - os.remove(image4) + remove_test_image(image0) + remove_test_image(image1) + remove_test_image(image2) + remove_test_image(image3) + remove_test_image(image4) =20 def test_query_fdset(self): result =3D self.vm.qmp('query-fdsets') @@ -129,7 +129,7 @@ class TestFdSets(iotests.QMPTestCase): class TestSCMFd(iotests.QMPTestCase): def setUp(self): self.vm =3D iotests.VM() - qemu_img('create', '-f', iotests.imgfmt, image0, '128K') + create_test_image(image0, '128K') # Add an unused monitor, to verify it works fine when two monitor # instances present self.vm.add_monitor_null() @@ -137,7 +137,7 @@ class TestSCMFd(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(image0) + remove_test_image(image0) =20 def _send_fd_by_SCM(self): ret =3D self.vm.send_fd_scm(file_path=3Dimage0) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962163; cv=none; d=zoho.com; s=zohoarc; b=E+racoX3QiGljhfs76dTEWW/1+FGJTS8/8V6Q6nxRzkqWkEdppnbZK1fQt53Ga/qEzXLuMuBQExOpzs59MJnMaUy3ZtLot/taRN+fOUpbBnddfy0sA5MavBNZaOQknhB5FzK+0XQ601p/zkvpxTTlA9thIXv8KbhA987ccvMcd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962163; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jPKIKCfDwo9L7WPEW4meFVe2jb3L6u78Ds1H0D/w8x8=; b=D9wRRiwhfDEc4/cZ63w3x1RH48s9t55iwU1VgaruKT84hTb3Yet2D0I+TuA6q+rjXCJ1xo2orVuioDACgHbWSqT1CNr/j05KGrxjlny2fvpr1DIkY7SgefJoAvNuGg1uhzZu2PmRYoeI44BW2CAUglkgFMdq1O73vZCn5GnXV48= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962163067771.3830215399038; Tue, 1 Oct 2019 13:36:03 -0700 (PDT) Received: from localhost ([::1]:47896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOsK-0002WS-OH for importer@patchew.org; Tue, 01 Oct 2019 16:36:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54429) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO83-0004qa-PM for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO81-00080o-Hz for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51836) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7x-0007yO-GQ; Tue, 01 Oct 2019 15:48:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2508A44AE1; Tue, 1 Oct 2019 19:48:04 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D72A60619; Tue, 1 Oct 2019 19:48:04 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 20/67] iotests/055: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:28 +0200 Message-Id: <20191001194715.2796-21-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Tue, 01 Oct 2019 19:48:04 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/055 | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055 index c732a112d6..e44f18570d 100755 --- a/tests/qemu-iotests/055 +++ b/tests/qemu-iotests/055 @@ -23,7 +23,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_io =20 test_img =3D os.path.join(iotests.test_dir, 'test.img') target_img =3D os.path.join(iotests.test_dir, 'target.img') @@ -32,7 +32,7 @@ blockdev_target_img =3D os.path.join(iotests.test_dir, 'b= lockdev-target.img') image_len =3D 64 * 1024 * 1024 # MB =20 def setUpModule(): - qemu_img('create', '-f', iotests.imgfmt, test_img, str(image_len)) + create_test_image(test_img, image_len) qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x11 0 64k', test_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x00 64k 128k', test_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x22 162k 32k', test_img) @@ -41,12 +41,12 @@ def setUpModule(): qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x33 67043328 64k', test_= img) =20 def tearDownModule(): - os.remove(test_img) + remove_test_image(test_img) =20 =20 class TestSingleDrive(iotests.QMPTestCase): def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, blockdev_target_img, str(= image_len)) + create_test_image(blockdev_target_img, image_len) =20 self.vm =3D iotests.VM().add_drive('blkdebug::' + test_img) self.vm.add_drive(blockdev_target_img, interface=3D"none") @@ -56,7 +56,7 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(blockdev_target_img) + remove_test_image(blockdev_target_img) try: os.remove(target_img) except OSError: @@ -163,7 +163,7 @@ class TestSingleDrive(iotests.QMPTestCase): =20 class TestSetSpeed(iotests.QMPTestCase): def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, blockdev_target_img, str(= image_len)) + create_test_image(blockdev_target_img, image_len) =20 self.vm =3D iotests.VM().add_drive('blkdebug::' + test_img) self.vm.add_drive(blockdev_target_img, interface=3D"none") @@ -171,7 +171,7 @@ class TestSetSpeed(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(blockdev_target_img) + remove_test_image(blockdev_target_img) try: os.remove(target_img) except OSError: @@ -249,7 +249,7 @@ class TestSetSpeed(iotests.QMPTestCase): # would stall. Instead, we limit the block job speed here. class TestSingleTransaction(iotests.QMPTestCase): def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, blockdev_target_img, str(= image_len)) + create_test_image(blockdev_target_img, image_len) =20 self.vm =3D iotests.VM().add_drive(test_img) self.vm.add_drive(blockdev_target_img, interface=3D"none") @@ -259,7 +259,7 @@ class TestSingleTransaction(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(blockdev_target_img) + remove_test_image(blockdev_target_img) try: os.remove(target_img) except OSError: @@ -452,29 +452,34 @@ class TestSingleTransaction(iotests.QMPTestCase): =20 class TestDriveCompression(iotests.QMPTestCase): image_len =3D 64 * 1024 * 1024 # MB - fmt_supports_compression =3D [{'type': 'qcow2', 'args': ()}, - {'type': 'vmdk', 'args': ('-o', 'subformat= =3DstreamOptimized')}] + fmt_supports_compression =3D [{'type': 'qcow2', 'opts': []}, + {'type': 'vmdk', 'opts': ['subformat=3Dstr= eamOptimized']}] + + # Compression does not work with external data files + @iotests.skip_for_imgopts(['data_file']) + def setUp(self): + pass =20 def tearDown(self): self.vm.shutdown() - os.remove(blockdev_target_img) + remove_test_image(blockdev_target_img) try: os.remove(target_img) except OSError: pass =20 - def do_prepare_drives(self, fmt, args, attach_target): + def do_prepare_drives(self, fmt, opts, attach_target): self.vm =3D iotests.VM().add_drive('blkdebug::' + test_img) =20 - qemu_img('create', '-f', fmt, blockdev_target_img, - str(TestDriveCompression.image_len), *args) + create_test_image(blockdev_target_img, TestDriveCompression.image_= len, + fmt=3Dfmt, opts=3Dopts) if attach_target: self.vm.add_drive(blockdev_target_img, format=3Dfmt, interface= =3D"none") =20 self.vm.launch() =20 def do_test_compress_complete(self, cmd, format, attach_target, **args= ): - self.do_prepare_drives(format['type'], format['args'], attach_targ= et) + self.do_prepare_drives(format['type'], format['opts'], attach_targ= et) =20 self.assert_no_active_block_jobs() =20 @@ -499,7 +504,7 @@ class TestDriveCompression(iotests.QMPTestCase): target=3D'drive1') =20 def do_test_compress_cancel(self, cmd, format, attach_target, **args): - self.do_prepare_drives(format['type'], format['args'], attach_targ= et) + self.do_prepare_drives(format['type'], format['opts'], attach_targ= et) =20 self.assert_no_active_block_jobs() =20 @@ -523,7 +528,7 @@ class TestDriveCompression(iotests.QMPTestCase): target=3D'drive1') =20 def do_test_compress_pause(self, cmd, format, attach_target, **args): - self.do_prepare_drives(format['type'], format['args'], attach_targ= et) + self.do_prepare_drives(format['type'], format['opts'], attach_targ= et) =20 self.assert_no_active_block_jobs() =20 --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961415; cv=none; d=zoho.com; s=zohoarc; b=kee9eyr9VgK7RZjxjPDWCEOCvbN7YRZviOYcY+9MYRjTLP7yYH+MsDEcL3OCvYjX6SoPEZ3HpmAKvDyJ68z4+eUgUtuzmeTCJId8dHzDeLyjv6AyHYx0NGTcbGm4M82G+UedBoRQXGRcpLc08UBvWVweMr4fq2o3L3VPYvJG5gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961415; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=rUAtQHRbhfpxU+GvoR9Yxr+wF/sWH1nACWiIOTMoJWQ=; b=BuKOQoKxXDPSCsiQ5gciMr8XhIUIi7giwDKKl9mrGrf8ljy5i97fuaCjP87diMfoBV+obQNyAxxyTGqdSvpN4Wi0kcW39IQ4TVKWDKq+vA5AMMQS6ZYW2uSRs17NZ90gKnivbBObQ3/d3Aj0DBVS5gNW9GtwAnDohtzxb7fHgeA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961415203213.51733467932218; Tue, 1 Oct 2019 13:23:35 -0700 (PDT) Received: from localhost ([::1]:47806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOgE-0001D2-1w for importer@patchew.org; Tue, 01 Oct 2019 16:23:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54470) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO87-0004uU-Oo for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO85-00082S-Kp for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO7z-0007zf-Ts; Tue, 01 Oct 2019 15:48:08 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14D643084025; Tue, 1 Oct 2019 19:48:07 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A3139261B7; Tue, 1 Oct 2019 19:48:06 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 21/67] iotests/056: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:29 +0200 Message-Id: <20191001194715.2796-22-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 01 Oct 2019 19:48:07 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/056 | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056 index 98c55d8e5a..58b4103cd9 100755 --- a/tests/qemu-iotests/056 +++ b/tests/qemu-iotests/056 @@ -23,7 +23,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io, create_image +from iotests import create_test_image, remove_test_image, qemu_io, create_= image =20 backing_img =3D os.path.join(iotests.test_dir, 'backing.img') test_img =3D os.path.join(iotests.test_dir, 'test.img') @@ -31,18 +31,12 @@ target_img =3D os.path.join(iotests.test_dir, 'target.i= mg') =20 def img_create(img, fmt=3Diotests.imgfmt, size=3D'64M', **kwargs): fullname =3D os.path.join(iotests.test_dir, '%s.%s' % (img, fmt)) - optargs =3D [] - for k,v in kwargs.items(): - optargs =3D optargs + ['-o', '%s=3D%s' % (k,v)] - args =3D ['create', '-f', fmt] + optargs + [fullname, size] - iotests.qemu_img(*args) + opts =3D [] + for k, v in kwargs.items(): + opts.append('%s=3D%s' % (k, v)) + create_test_image(fullname, size, fmt=3Dfmt, opts=3Dopts) return fullname =20 -def try_remove(img): - try: - os.remove(img) - except OSError: - pass =20 def io_write_patterns(img, patterns): for pattern in patterns: @@ -54,7 +48,7 @@ class TestSyncModesNoneAndTop(iotests.QMPTestCase): =20 def setUp(self): create_image(backing_img, TestSyncModesNoneAndTop.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=3D%s'= % backing_img, test_img) + create_test_image(test_img, backing_file=3Dbacking_img) qemu_io('-c', 'write -P0x41 0 512', test_img) qemu_io('-c', 'write -P0xd5 1M 32k', test_img) qemu_io('-c', 'write -P0xdc 32M 124k', test_img) @@ -64,7 +58,7 @@ class TestSyncModesNoneAndTop(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) os.remove(backing_img) try: os.remove(target_img) @@ -103,6 +97,8 @@ class TestSyncModesNoneAndTop(iotests.QMPTestCase): self.assertEqual(-1, qemu_io('-c', 'read -P0x41 0 512', target_img= ).find("verification failed")) =20 class TestBeforeWriteNotifier(iotests.QMPTestCase): + # blkdebug does not work with an external data file + @iotests.skip_for_imgopts(['data_file']) def setUp(self): self.vm =3D iotests.VM().add_drive_raw("file=3Dblkdebug::null-co:/= /,id=3Ddrive0,align=3D65536,driver=3Dblkdebug") self.vm.launch() @@ -139,9 +135,9 @@ class BackupTest(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - try_remove(self.test_img) - try_remove(self.dest_img) - try_remove(self.ref_img) + remove_test_image(self.test_img) + remove_test_image(self.dest_img) + remove_test_image(self.ref_img) =20 def hmp_io_writes(self, drive, patterns): for pattern in patterns: @@ -268,6 +264,8 @@ class BackupTest(iotests.QMPTestCase): sync=3D'full', target=3Dself.dest_img, auto_dismiss=3DFalse) =20 + # blkdebug does not work with an external data file + @iotests.skip_for_imgopts(['data_file']) def dismissal_failure(self, dismissal_opt): res =3D self.vm.qmp('query-block-jobs') self.assert_qmp(res, 'return', []) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961874; cv=none; d=zoho.com; s=zohoarc; b=Md3GcDrywCDhU4rWlZoULANDuZp8j42baaWb4BRFIUKEZ/Ct/Z+3GbaBkKesTHloy6b5TTOe0/sH9M6rg/VkS6k5/8jNeIx2RSnEu8irR9IWpiiFnxsjZcZ6H8Hq9faTRfxaTrinbOeNsnGRs5CjA4jjANlACPXfbtCsXNMJ8g0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961874; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=dq5Ps183Qn9FQ0h55wgvk557HSDCpzLE/M0WEauGz28=; b=WctspprLAEke7qtm4Pw3DVSvMvpsEpmBGw39fslNoH1sprMM+ttbfskaL/sVWZVSUbzz1XryktYzGlDNuHgwavESyljbpcmIUV3U6snK7Fy0Am9Ss3FmcYN5SDAHkoGowZkVhbc2NkIpEy2yw4tg79FKD9SXJvjElYoTO1a3yf0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961874644530.2353700893769; Tue, 1 Oct 2019 13:31:14 -0700 (PDT) Received: from localhost ([::1]:47858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOng-0007tG-0C for importer@patchew.org; Tue, 01 Oct 2019 16:31:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54517) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8D-0004wY-Q8 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO89-00085w-Nb for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37874) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO83-00080s-KW; Tue, 01 Oct 2019 15:48:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6217B10CC1E6; Tue, 1 Oct 2019 19:48:09 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE6C95C1D4; Tue, 1 Oct 2019 19:48:08 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 22/67] iotests/057: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:30 +0200 Message-Id: <20191001194715.2796-23-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 01 Oct 2019 19:48:09 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/057 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/057 b/tests/qemu-iotests/057 index f5aa5929dc..c83f969b09 100755 --- a/tests/qemu-iotests/057 +++ b/tests/qemu-iotests/057 @@ -23,7 +23,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_io =20 test_drv_base_name =3D 'drive' =20 @@ -40,7 +40,7 @@ class ImageSnapshotTestCase(iotests.QMPTestCase): filename =3D '%s%d' % (test_img_base_name, i) img =3D os.path.join(iotests.test_dir, filename) device =3D '%s%d' % (test_drv_base_name, i) - qemu_img('create', '-f', iotests.imgfmt, img, str(self.image_l= en)) + create_test_image(img, self.image_len) self.vm.add_drive(img) self.expect.append({'image': img, 'device': device, 'snapshots': [], @@ -50,7 +50,7 @@ class ImageSnapshotTestCase(iotests.QMPTestCase): def tearDown(self): self.vm.shutdown() for dev_expect in self.expect: - os.remove(dev_expect['image']) + remove_test_image(dev_expect['image']) =20 def createSnapshotInTransaction(self, snapshot_num, abort =3D False): actions =3D [] --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962260; cv=none; d=zoho.com; s=zohoarc; b=Mljj41KMBZ81PlqgmWf/WHCRDUCqqAr2qDs8KP3zZjtPQ2y/Qt7T76icwYhpajEugIQ4zpd23wz8fZ7Det0CwtVh3H2uDAxp71LERY+drhKTS1BGK4kUuZhe9lCvLkCPxyayMcbK63GIdtnPP17vz3tNDDCDNk4ioxpdyI3Yu+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962260; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=nK3HurDA3jIAwroKXnDOQDbXk2LPlE9sA+Rn92FFEZI=; b=WvoblyAKWT/SUNjC0R/nmBlKjwOe7Pjmj1XTvcG3pcjxPY4D/nzkPN4E/uRMGfupHUHr+ILvkXZj7nPg1tFvdAQtuV8fgYeSIM100WQsBU6SmUNMZD4P0xgPNEsCSwjFv11Pdy9o4jl8GNxgh0mgitC/2XuuyQLJhHMkBCBDUYc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156996226040271.52104691936927; Tue, 1 Oct 2019 13:37:40 -0700 (PDT) Received: from localhost ([::1]:47906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOtu-00046F-Lv for importer@patchew.org; Tue, 01 Oct 2019 16:37:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54550) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8F-0004x7-QK for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8D-00087P-Nc for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44440) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO85-00081k-Hc; Tue, 01 Oct 2019 15:48:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA3632A09B2; Tue, 1 Oct 2019 19:48:11 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44C54611DB; Tue, 1 Oct 2019 19:48:11 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 23/67] iotests/065: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:31 +0200 Message-Id: <20191001194715.2796-24-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 01 Oct 2019 19:48:11 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/065 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 index 9db9552784..221a87417d 100755 --- a/tests/qemu-iotests/065 +++ b/tests/qemu-iotests/065 @@ -23,7 +23,7 @@ import os import re import json import iotests -from iotests import qemu_img, qemu_img_pipe +from iotests import create_test_image, remove_test_image, qemu_img_pipe import unittest =20 test_img =3D os.path.join(iotests.test_dir, 'test.img') @@ -34,11 +34,10 @@ class TestImageInfoSpecific(iotests.QMPTestCase): def setUp(self): if self.img_options is None: self.skipTest('Skipping abstract test class') - qemu_img('create', '-f', iotests.imgfmt, '-o', self.img_options, - test_img, '128K') + create_test_image(test_img, '128K', opts=3Dself.img_options) =20 def tearDown(self): - os.remove(test_img) + remove_test_image(test_img) =20 class TestQemuImgInfo(TestImageInfoSpecific): '''Abstract base class for qemu-img info tests''' @@ -87,13 +86,13 @@ class TestQMP(TestImageInfoSpecific): =20 class TestQCow2(TestQemuImgInfo): '''Testing a qcow2 version 2 image''' - img_options =3D 'compat=3D0.10' + img_options =3D ['compat=3D0.10'] json_compare =3D { 'compat': '0.10', 'refcount-bits': 16 } human_compare =3D [ 'compat: 0.10', 'refcount bits: 16' ] =20 class TestQCow3NotLazy(TestQemuImgInfo): '''Testing a qcow2 version 3 image with lazy refcounts disabled''' - img_options =3D 'compat=3D1.1,lazy_refcounts=3Doff' + img_options =3D ['compat=3D1.1', 'lazy_refcounts=3Doff'] json_compare =3D { 'compat': '1.1', 'lazy-refcounts': False, 'refcount-bits': 16, 'corrupt': False } human_compare =3D [ 'compat: 1.1', 'lazy refcounts: false', @@ -101,7 +100,7 @@ class TestQCow3NotLazy(TestQemuImgInfo): =20 class TestQCow3Lazy(TestQemuImgInfo): '''Testing a qcow2 version 3 image with lazy refcounts enabled''' - img_options =3D 'compat=3D1.1,lazy_refcounts=3Don' + img_options =3D ['compat=3D1.1', 'lazy_refcounts=3Don'] json_compare =3D { 'compat': '1.1', 'lazy-refcounts': True, 'refcount-bits': 16, 'corrupt': False } human_compare =3D [ 'compat: 1.1', 'lazy refcounts: true', @@ -110,7 +109,7 @@ class TestQCow3Lazy(TestQemuImgInfo): class TestQCow3NotLazyQMP(TestQMP): '''Testing a qcow2 version 3 image with lazy refcounts disabled, openi= ng with lazy refcounts enabled''' - img_options =3D 'compat=3D1.1,lazy_refcounts=3Doff' + img_options =3D ['compat=3D1.1', 'lazy_refcounts=3Doff'] qemu_options =3D 'lazy-refcounts=3Don' compare =3D { 'compat': '1.1', 'lazy-refcounts': False, 'refcount-bits': 16, 'corrupt': False } @@ -119,7 +118,7 @@ class TestQCow3NotLazyQMP(TestQMP): class TestQCow3LazyQMP(TestQMP): '''Testing a qcow2 version 3 image with lazy refcounts enabled, opening with lazy refcounts disabled''' - img_options =3D 'compat=3D1.1,lazy_refcounts=3Don' + img_options =3D ['compat=3D1.1', 'lazy_refcounts=3Don'] qemu_options =3D 'lazy-refcounts=3Doff' compare =3D { 'compat': '1.1', 'lazy-refcounts': True, 'refcount-bits': 16, 'corrupt': False } --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962476; cv=none; d=zoho.com; s=zohoarc; b=j9IPg+mtoJLy0PxDW9Ffz+VC0mPOISZDK5qNg4LSNIWc6Z7lzsZ0sAR+ed3rBBKbzHYgtckefGzBY503YN+AkOCW5LDeiU8ygb17I3qxcsfth7FHW3L5jaGsS/I0Ve2rVLiiK4dR63fz1ZVwQVm13vGB9eoqgK3rh5eDc6ZdVHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962476; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HLuafMAS3t6KJ7RBchGW7a2u5Uop4TuQ7CA75KYKmeg=; b=epLLKyBOzrz+IK4VD8pJ+un6z3vn4IhO2QYDohPnV6EYnKx4WjenZF0Qmq/4uzM6xUuXTEB1+cyzJI0Qmj7T1B2N9Q4f/zVzcXbmoey5DxPdmLMqgya+SDmHCW30fgsG0U6bog/d5D37cyEZUAW27A8+aXWI0U7f4gfGlQbLjv0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962476920808.9153856977059; Tue, 1 Oct 2019 13:41:16 -0700 (PDT) Received: from localhost ([::1]:47940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOxL-00084q-Jg for importer@patchew.org; Tue, 01 Oct 2019 16:41:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54578) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8G-0004yO-Q8 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8F-00088Z-PJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44452) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO87-00083v-Jx; Tue, 01 Oct 2019 15:48:15 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0120B2A09A1; Tue, 1 Oct 2019 19:48:14 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E2C3100197A; Tue, 1 Oct 2019 19:48:13 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 24/67] iotests/096: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:32 +0200 Message-Id: <20191001194715.2796-25-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 01 Oct 2019 19:48:14 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/096 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096 index ab9cb47822..ee0cfbffe8 100755 --- a/tests/qemu-iotests/096 +++ b/tests/qemu-iotests/096 @@ -20,6 +20,7 @@ # =20 import iotests +from iotests import create_test_image, remove_test_image import os =20 class TestLiveSnapshot(iotests.QMPTestCase): @@ -35,13 +36,13 @@ class TestLiveSnapshot(iotests.QMPTestCase): opts.append('throttling.group=3D%s' % self.group) opts.append('throttling.iops-total=3D%d' % self.iops) opts.append('throttling.iops-size=3D%d' % self.iops_size) - iotests.qemu_img('create', '-f', iotests.imgfmt, self.base_img, '1= 00M') + create_test_image(self.base_img, '100M') self.vm =3D iotests.VM().add_drive(self.base_img, ','.join(opts)) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(self.base_img) + remove_test_image(self.base_img) os.remove(self.target_img) =20 def checkConfig(self, active_layer): --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569960703; cv=none; d=zoho.com; s=zohoarc; b=IwrxSEEwRvNkQTtN87qMACmarYhCJ0rlsh45pDq6ElLF47eEPCLgZcfbV0RwMyeQzVqI7kBGymuVaqqORKICX0xf8crKWhf375a/xHYELhjnQwKiNYtLSAhoiWf4xEVXbPLddCYK+sJatWiOGBN3whszEOLgzlkwiP9o5dCpc5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569960703; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=f0SDrham1EJ8Te8Ud77AMfymM/7s+fvqqNQVnH0czjE=; b=IiE8k/BARo8TRJqZaNAq5k99PNuPPi0/HgaCqVIKw6jd1iQYvVqzvqk8fNzU67j8pGhVMA/6873HCJH+c1ns2vQ6gcTa/6DrO/CSrJyac7o4PAlt4bQsqWvV+xbJF+Ur/9B/L6kNwHCSbROPlJYhcgv2j1LqfHaPnzSxSdN5aqs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569960703312988.8500210149389; Tue, 1 Oct 2019 13:11:43 -0700 (PDT) Received: from localhost ([::1]:47726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOUn-0000Aq-G1 for importer@patchew.org; Tue, 01 Oct 2019 16:11:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8I-00050Q-OY for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8H-00089W-4G for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60188) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO89-00085M-Kv; Tue, 01 Oct 2019 15:48:21 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 493DA10DCC92; Tue, 1 Oct 2019 19:48:16 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7C4519C6A; Tue, 1 Oct 2019 19:48:15 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 25/67] iotests/118: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:33 +0200 Message-Id: <20191001194715.2796-26-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:48:16 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/118 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index ea0b326ae0..634a0b6445 100755 --- a/tests/qemu-iotests/118 +++ b/tests/qemu-iotests/118 @@ -23,7 +23,7 @@ import os import stat import time import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 old_img =3D os.path.join(iotests.test_dir, 'test0.img') new_img =3D os.path.join(iotests.test_dir, 'test1.img') @@ -301,8 +301,8 @@ class TestInitiallyFilled(GeneralChangeTestsBaseClass): was_empty =3D False =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, old_img, '1440k') - qemu_img('create', '-f', iotests.imgfmt, new_img, '1440k') + create_test_image(old_img, '1440k') + create_test_image(new_img, '1440k') self.vm =3D iotests.VM() if self.use_drive: self.vm.add_drive(old_img, 'media=3D%s' % self.media, 'none') @@ -320,8 +320,8 @@ class TestInitiallyFilled(GeneralChangeTestsBaseClass): =20 def tearDown(self): self.vm.shutdown() - os.remove(old_img) - os.remove(new_img) + remove_test_image(old_img) + remove_test_image(new_img) =20 def test_insert_on_filled(self): result =3D self.vm.qmp('blockdev-add', @@ -344,7 +344,7 @@ class TestInitiallyEmpty(GeneralChangeTestsBaseClass): was_empty =3D True =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, new_img, '1440k') + create_test_image(new_img, '1440k') self.vm =3D iotests.VM() if self.use_drive: self.vm.add_drive(None, 'media=3D%s' % self.media, 'none') @@ -358,7 +358,7 @@ class TestInitiallyEmpty(GeneralChangeTestsBaseClass): =20 def tearDown(self): self.vm.shutdown() - os.remove(new_img) + remove_test_image(new_img) =20 def test_remove_on_empty(self): result =3D self.vm.qmp('blockdev-open-tray', id=3Dself.device_name) @@ -394,16 +394,16 @@ class TestChangeReadOnly(ChangeBaseClass): device_name =3D 'qdev0' =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, old_img, '1440k') - qemu_img('create', '-f', iotests.imgfmt, new_img, '1440k') + create_test_image(old_img, '1440k') + create_test_image(new_img, '1440k') self.vm =3D iotests.VM() =20 def tearDown(self): self.vm.shutdown() os.chmod(old_img, 0o666) os.chmod(new_img, 0o666) - os.remove(old_img) - os.remove(new_img) + remove_test_image(old_img) + remove_test_image(new_img) =20 def test_ro_ro_retain(self): os.chmod(old_img, 0o444) @@ -640,7 +640,7 @@ class TestBlockJobsAfterCycle(ChangeBaseClass): device_name =3D 'qdev0' =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, old_img, '1440K') + create_test_image(old_img, '1440k') =20 self.vm =3D iotests.VM() self.vm.add_drive_raw("id=3Ddrive0,driver=3Dnull-co,if=3Dnone") @@ -674,7 +674,7 @@ class TestBlockJobsAfterCycle(ChangeBaseClass): =20 def tearDown(self): self.vm.shutdown() - os.remove(old_img) + remove_test_image(old_img) try: os.remove(new_img) except OSError: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961780; cv=none; d=zoho.com; s=zohoarc; b=EHBf0vUr3JhvUMiaCV3InQknpWVwRoUHw5ZvSjWo7vShNSU8QflcjJ1PKXchGGdh2uUBZL/yQcAUroyAG6LojfFcDJ8SXNB7ubQqrzXT5JC5jOxX+NNvPdpPQjhXcFD22ca08zmi5drUbdHWNmO6aACpEqjE0oVf0UaAs+/C/dA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961780; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=AVeGheUCPURSC8ivMnOp9Ik+g7MP5BtfYIM2QZTfrR4=; b=NXCI19U5KS/ayPbCegZQp7birA/BmU081dGCxALcD9V0y2A5wOe/jDgfPkrgLtSE1TMKU0f1uIzBWClMt+vwPJtUmym1ba9lk+bbwrbdnWGq3IU8CEC/31GY9Y6HJ114xo9n3O5kZYxJ3dDkQGBEeYmgUdHRly7DemyDgEziHIA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961780511984.6393712177943; Tue, 1 Oct 2019 13:29:40 -0700 (PDT) Received: from localhost ([::1]:47850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOm8-00077M-Ui for importer@patchew.org; Tue, 01 Oct 2019 16:29:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54641) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8K-00052g-B3 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8I-0008A4-3M for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57304) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8D-00086R-Ku; Tue, 01 Oct 2019 15:48:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 90E9C3082131; Tue, 1 Oct 2019 19:48:18 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2DC8E5C1D4; Tue, 1 Oct 2019 19:48:17 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 26/67] iotests/124: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:34 +0200 Message-Id: <20191001194715.2796-27-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 01 Oct 2019 19:48:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/124 | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index d3e851e1ae..145dccb2b0 100755 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -22,6 +22,7 @@ =20 import os import iotests +from iotests import create_test_image, remove_test_image =20 =20 def io_write_patterns(img, patterns): @@ -29,13 +30,6 @@ def io_write_patterns(img, patterns): iotests.qemu_io('-c', 'write -P%s %s %s' % pattern, img) =20 =20 -def try_remove(img): - try: - os.remove(img) - except OSError: - pass - - def transaction_action(action, **kwargs): return { 'type': action, @@ -82,13 +76,13 @@ class Bitmap: =20 def del_target(self): for image in self.backups.pop(): - try_remove(image) + remove_test_image(image) self.num -=3D 1 =20 def cleanup(self): for backup in self.backups: for image in backup: - try_remove(image) + remove_test_image(image) =20 =20 class TestIncrementalBackupBase(iotests.QMPTestCase): @@ -133,15 +127,14 @@ class TestIncrementalBackupBase(iotests.QMPTestCase): =20 def img_create(self, img, fmt=3Diotests.imgfmt, size=3D'64M', parent=3DNone, parentFormat=3DNone, **kwargs): - optargs =3D [] - for k,v in kwargs.items(): - optargs =3D optargs + ['-o', '%s=3D%s' % (k,v)] - args =3D ['create', '-f', fmt] + optargs + [img, size] + opts =3D [] + for k, v in kwargs.items(): + opts.append('%s=3D%s' % (k, v)) if parent: if parentFormat is None: parentFormat =3D fmt - args =3D args + ['-b', parent, '-F', parentFormat] - iotests.qemu_img(*args) + create_test_image(img, size, fmt=3Dfmt, backing_file=3Dparent, + backing_fmt=3DparentFormat, opts=3Dopts) self.files.append(img) =20 =20 @@ -287,7 +280,7 @@ class TestIncrementalBackupBase(iotests.QMPTestCase): for bitmap in self.bitmaps: bitmap.cleanup() for filename in self.files: - try_remove(filename) + remove_test_image(filename) =20 =20 =20 @@ -414,6 +407,8 @@ class TestIncrementalBackup(TestIncrementalBackupBase): self.check_backups() =20 =20 + # blkdebug does not work with an external data file + @iotests.skip_for_imgopts(['data_file']) def do_transaction_failure_test(self, race=3DFalse): # Create a second drive, with pattern: drive1 =3D self.add_node('drive1') @@ -608,6 +603,8 @@ class TestIncrementalBackup(TestIncrementalBackupBase): class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase): '''Incremental backup tests that utilize a BlkDebug filter on drive0.'= '' =20 + # blkdebug does not work with an external data file + @iotests.skip_for_imgopts(['data_file']) def setUp(self): drive0 =3D self.add_node('drive0') self.img_create(drive0['file'], drive0['fmt']) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962810; cv=none; d=zoho.com; s=zohoarc; b=PxprykGVSrmbT8VUfu1+vtbQ9VIjoDozrCG3M6+0TVNFijbC+XHkAU4IQ5Di7u2nkGCXHQ0wcmFurvMr9OnpcBpKqpmkYj8ZyAySVu8mhkGHHiXaXI+F/OEE4MTDfAHYpkef2nskLNflXXNAcNNfhxKqd+yrnwqMlDzlHbe1mr8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962810; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=IAeCGamgMs47p5M4OgiJsOC1aGi7Yyst2po7dn7HmzI=; b=NNWulO3BqZzm75XIz4rWHnPkb+giR4HoDBt+AOOZwE4S51+p75sUxazTOZHzH7DPaMiZVJOgIPWoMLYD8aZd2gh7oOVqJVOqRU2hz1JzvlTseeUiHCKJr6bwjsTyLUDWXzz8MvKGQ1C1E2C5rRVRgpdVTYndfFmyLW1dPhDwU1A= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962810460708.2513046963493; Tue, 1 Oct 2019 13:46:50 -0700 (PDT) Received: from localhost ([::1]:47980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP2k-0004g7-ES for importer@patchew.org; Tue, 01 Oct 2019 16:46:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54626) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8J-00051B-1F for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8H-00089t-SL for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37918) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8D-00086y-M3; Tue, 01 Oct 2019 15:48:21 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA3CF10CC1E6; Tue, 1 Oct 2019 19:48:20 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74BE75C1D4; Tue, 1 Oct 2019 19:48:20 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 27/67] iotests/129: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:35 +0200 Message-Id: <20191001194715.2796-28-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 01 Oct 2019 19:48:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/129 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index cd6b9e9ce7..379719d85b 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -20,6 +20,7 @@ =20 import os import iotests +from iotests import create_test_image, remove_test_image import time =20 class TestStopWithBlockJob(iotests.QMPTestCase): @@ -28,8 +29,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase): base_img =3D os.path.join(iotests.test_dir, 'base.img') =20 def setUp(self): - iotests.qemu_img('create', '-f', iotests.imgfmt, self.base_img, "1= G") - iotests.qemu_img('create', '-f', iotests.imgfmt, self.test_img, "-= b", self.base_img) + create_test_image(self.base_img, '1G') + create_test_image(self.test_img, backing_file=3Dself.base_img) iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x5d 1M 128M'= , self.test_img) self.vm =3D iotests.VM().add_drive(self.test_img) self.vm.launch() @@ -46,6 +47,12 @@ class TestStopWithBlockJob(iotests.QMPTestCase): result =3D self.vm.qmp("block_set_io_throttle", conv_keys=3DFalse, **params) self.vm.shutdown() + remove_test_image(self.test_img) + remove_test_image(self.base_img) + try: + os.remove(self.target_img) + except OSError: + pass =20 def do_test_stop(self, cmd, **args): """Test 'stop' while block job is running on a throttled drive. --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963169; cv=none; d=zoho.com; s=zohoarc; b=URLWaVf2SNnTBoDnykebVwQmAzamWmR6hMge8UL1REmxSEG8eyTVp29OMqMJ14YmcIhu/H3ZBsIu2oTZ/fyucUn88drSmBiUdMKK6svZeZEyDS69rT0ANKm039Z9lAKy3bCXDITDoubFoEkTDvggfYmVIV5IXgAZ2S+8px/+r3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963169; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=KYmYOiDVkOoUKntqMjvvx6VdLV3yReLoh4D7H8sC0eU=; b=JJ41iybcq5O3MjZx2g8UPxtZUax27lwCkMWPGaA7GeaP04Yx3D4vJKlXj4+ppKlb7tEyU9nBuY7zzSxe1q/WNlBXMk2Ca1/3c9BbSpOIR3fMyMg7tM9Ef7wAOjoOpJOVFQVaKqNkccUvmqQA70FmLlhcGh3rm7wjlROfPK+LF80= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963169501328.7216850818262; Tue, 1 Oct 2019 13:52:49 -0700 (PDT) Received: from localhost ([::1]:48032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP8Z-0000Jq-J5 for importer@patchew.org; Tue, 01 Oct 2019 16:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54643) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8K-00052o-F4 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8I-0008AF-Cg for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60210) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8F-000884-UB; Tue, 01 Oct 2019 15:48:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3006A10DCC92; Tue, 1 Oct 2019 19:48:23 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC40160C5D; Tue, 1 Oct 2019 19:48:22 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 28/67] iotests/132: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:36 +0200 Message-Id: <20191001194715.2796-29-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:48:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/132 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/132 b/tests/qemu-iotests/132 index 0f2a106c81..9c7b773f09 100755 --- a/tests/qemu-iotests/132 +++ b/tests/qemu-iotests/132 @@ -21,7 +21,7 @@ import time import os import iotests -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_io =20 test_img =3D os.path.join(iotests.test_dir, 'test.img') target_img =3D os.path.join(iotests.test_dir, 'target.img') @@ -31,7 +31,7 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def setUp(self): # Write data to the image so we can compare later - qemu_img('create', '-f', iotests.imgfmt, test_img, str(TestSingleD= rive.image_len)) + create_test_image(test_img, TestSingleDrive.image_len) qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x5d 0 2M', test_img) =20 self.vm =3D iotests.VM().add_drive(test_img, 'discard=3Dunmap') @@ -39,7 +39,7 @@ class TestSingleDrive(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) try: os.remove(target_img) except OSError: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963410; cv=none; d=zoho.com; s=zohoarc; b=D6INJd7dfac3fzuvgsWfIZsOX8n4hDAuQwqJLa3abL9VFiOG1x43tKj9hmt1JfbIHJ4IQhdeJHhUFBbriHuGpALewVxwSYK363pqzPZcrY+A9h4T+4cwvnmUTdbYHrT3zeXrPxbY0UlRIfFtMyULyswjsLvGMuAuRFRS67VA9cc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963410; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=4ozHPCTvfRjIt3lGbgaWwnmBp3Yfm2B4u6HFTZ9dpWA=; b=NCrt8u+Uhq2IwUjSvD04KpusZ1Rl2T3PniKNuiVGrGd+qdNqHHyY+xbbgE7+PSn8Kpz1Xk5VDjXwVZjSDwG2ou6RJZj+AhBe778hTCOUeKC1uOEqdbhQYSY1x3aD5p6oNkrkE++kWcR9KnttKDHeGLqTT+serONvD79Dedi0RQ8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963410220848.9517179340796; Tue, 1 Oct 2019 13:56:50 -0700 (PDT) Received: from localhost ([::1]:48068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPCS-00048U-8R for importer@patchew.org; Tue, 01 Oct 2019 16:56:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54678) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8M-00055n-VG for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8L-0008C5-RE for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57342) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8I-00089p-7u; Tue, 01 Oct 2019 15:48:26 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 774F33082149; Tue, 1 Oct 2019 19:48:25 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 11F245C224; Tue, 1 Oct 2019 19:48:24 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 29/67] iotests/139: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:37 +0200 Message-Id: <20191001194715.2796-30-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 01 Oct 2019 19:48:25 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/139 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139 index cbb5a76530..f4cb553116 100755 --- a/tests/qemu-iotests/139 +++ b/tests/qemu-iotests/139 @@ -21,6 +21,7 @@ =20 import os import iotests +from iotests import create_test_image, remove_test_image import time =20 base_img =3D os.path.join(iotests.test_dir, 'base.img') @@ -33,7 +34,7 @@ else: class TestBlockdevDel(iotests.QMPTestCase): =20 def setUp(self): - iotests.qemu_img('create', '-f', iotests.imgfmt, base_img, '1M') + create_test_image(base_img, '1M') self.vm =3D iotests.VM() self.vm.add_device("{},id=3Dvirtio-scsi".format( iotests.get_virtio_scsi_device())) @@ -41,9 +42,8 @@ class TestBlockdevDel(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(base_img) - if os.path.isfile(new_img): - os.remove(new_img) + remove_test_image(base_img) + remove_test_image(new_img) =20 # Check whether a BlockDriverState exists def checkBlockDriverState(self, node, must_exist =3D True): @@ -70,8 +70,7 @@ class TestBlockdevDel(iotests.QMPTestCase): # Add a BlockDriverState that will be used as overlay for the base_img= BDS def addBlockDriverStateOverlay(self, node): self.checkBlockDriverState(node, False) - iotests.qemu_img('create', '-u', '-f', iotests.imgfmt, - '-b', base_img, new_img, '1M') + create_test_image(new_img, '1M', backing_file=3Dbase_img, unsafe= =3DTrue) opts =3D {'driver': iotests.imgfmt, 'node-name': node, 'backing': None, @@ -202,7 +201,7 @@ class TestBlockdevDel(iotests.QMPTestCase): self.checkBlockDriverState(test, False) self.checkBlockDriverState(raw, False) self.checkBlockDriverState(blkverify, False) - iotests.qemu_img('create', '-f', iotests.imgfmt, new_img, '1M') + create_test_image(new_img, '1M') node_0 =3D {'driver': iotests.imgfmt, 'node-name': test, 'file': {'driver': 'file', @@ -226,7 +225,7 @@ class TestBlockdevDel(iotests.QMPTestCase): self.checkBlockDriverState(child0, False) self.checkBlockDriverState(child1, False) self.checkBlockDriverState(quorum, False) - iotests.qemu_img('create', '-f', iotests.imgfmt, new_img, '1M') + create_test_image(new_img, '1M') child_0 =3D {'driver': iotests.imgfmt, 'node-name': child0, 'file': {'driver': 'file', --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963613; cv=none; d=zoho.com; s=zohoarc; b=eSymMSuHq1iIBdGacsxe3phiNgvQvSB/d8F6SaMqibvJCOdW7qDAE9Q73c/iaNY1QPerW+zpYe+jrpTdw+B6+rjwG1vSVCQ0CHDxOHOB0wzqjpWF4ETSkbKqLtOtc7/YBKWPfzRXgBf2qUwjJPxYiY50Gg031EgjqdcvV5lizdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963613; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=rOR2zWlEYLBZ/I4tSOiz2AhnvOQagfhxREWWzAL/OXM=; b=g5Sag8w618RXTEd62HIez1XkI9XqLdsmb3KirZlsFyWw1nw5GCt4ohPyYXWBUPOxs46EUtqHpr2LKIv8pFl0zOubtobM95Wyd5w36MZVgqYYAw4BERMZwukXXRhh496wmSNhIgRvjpwFJ1Dqs8ZG+WsX+UBmSW6/d6IvjxtjWkE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963613354772.1834573750456; Tue, 1 Oct 2019 14:00:13 -0700 (PDT) Received: from localhost ([::1]:48116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPFh-0008QO-LI for importer@patchew.org; Tue, 01 Oct 2019 17:00:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54695) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8O-00056n-4H for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8M-0008CX-SI for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37702) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8K-0008B0-HN; Tue, 01 Oct 2019 15:48:28 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C0B3F2541; Tue, 1 Oct 2019 19:48:27 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5ABE360C63; Tue, 1 Oct 2019 19:48:27 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 30/67] iotests/147: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:38 +0200 Message-Id: <20191001194715.2796-31-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Tue, 01 Oct 2019 19:48:27 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index ab8480b9a4..920e44a65c 100755 --- a/tests/qemu-iotests/147 +++ b/tests/qemu-iotests/147 @@ -24,7 +24,8 @@ import socket import stat import time import iotests -from iotests import cachemode, imgfmt, qemu_img, qemu_nbd, qemu_nbd_early_= pipe +from iotests import cachemode, imgfmt, create_test_image, remove_test_imag= e, \ + qemu_nbd, qemu_nbd_early_pipe =20 NBD_PORT_START =3D 32768 NBD_PORT_END =3D NBD_PORT_START + 1024 @@ -80,13 +81,13 @@ class NBDBlockdevAddBase(iotests.QMPTestCase): =20 class QemuNBD(NBDBlockdevAddBase): def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, test_img, '64k') + create_test_image(test_img, '64k') self.vm =3D iotests.VM() self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) try: os.remove(unix_socket) except OSError: @@ -127,7 +128,7 @@ class QemuNBD(NBDBlockdevAddBase): =20 class BuiltinNBD(NBDBlockdevAddBase): def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, test_img, '64k') + create_test_image(test_img, '64k') self.vm =3D iotests.VM() self.vm.launch() self.server =3D iotests.VM('.server') @@ -140,7 +141,7 @@ class BuiltinNBD(NBDBlockdevAddBase): def tearDown(self): self.vm.shutdown() self.server.shutdown() - os.remove(test_img) + remove_test_image(test_img) try: os.remove(unix_socket) except OSError: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962472; cv=none; d=zoho.com; s=zohoarc; b=VLAF+zozKypf6zeIPbs/hxwbTy8O/gUp8eIFgZs5q1ma7pvw62gIm1mzVqECoooPd1atWsliDfDekk2m5yi3nEFLs6xoOLNJYz2bYNvAdNqq8T3wAG7pf7cFbAay1YGREkilXWuVI2gnHS7t5KLN4GN/qXV3/9SObJy04CG/Icc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962472; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HyoIhrgHclq29ytl88AsrFYZinzBWTFCc8akxai/diE=; b=JkY6Clsl+OkjKFHSKri8r5h1v88fDgMpD75XKcY8Xt9jAWOw+3aF8/qn/VWwmGfq6Fv6ia3oj6U+Hx3DDu0Nndu/jjMOoytXlzFhtoHkLK9vhj2ySQS+fbxPOCAq+hRxcuwI0ExkRrze3JDFonj2NeClIoLxz6UFgq5SygJ4ROA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156996247215681.23739484768817; Tue, 1 Oct 2019 13:41:12 -0700 (PDT) Received: from localhost ([::1]:47938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOxJ-0007y0-6N for importer@patchew.org; Tue, 01 Oct 2019 16:41:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54718) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8Q-00059e-Hz for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8P-0008Dj-Az for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37712) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8M-0008CH-Qn; Tue, 01 Oct 2019 15:48:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15E7C2541; Tue, 1 Oct 2019 19:48:30 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A375C5C1D4; Tue, 1 Oct 2019 19:48:29 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 31/67] iotests/148: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:39 +0200 Message-Id: <20191001194715.2796-32-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Tue, 01 Oct 2019 19:48:30 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/148 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/148 b/tests/qemu-iotests/148 index 8c11c53cba..a6df0ed983 100755 --- a/tests/qemu-iotests/148 +++ b/tests/qemu-iotests/148 @@ -21,6 +21,7 @@ =20 import os import iotests +from iotests import create_test_image, remove_test_image =20 imgs =3D (os.path.join(iotests.test_dir, 'quorum0.img'), os.path.join(iotests.test_dir, 'quorum1.img'), @@ -51,7 +52,7 @@ sector =3D "%d" driveopts =3D ['driver=3Dquorum', 'vote-threshold=3D2'] driveopts.append('read-pattern=3D%s' % self.read_pattern) for i in range(len(imgs)): - iotests.qemu_img('create', '-f', iotests.imgfmt, imgs[i], '1M') + create_test_image(imgs[i], '1M') self.create_blkdebug_file(img_conf[i], i + offset) driveopts.append('children.%d.driver=3D%s' % (i, iotests.imgfm= t)) driveopts.append('children.%d.file.driver=3Dblkdebug' % i) @@ -65,7 +66,7 @@ sector =3D "%d" def tearDown(self): self.vm.shutdown() for i in range(len(imgs)): - os.remove(imgs[i]) + remove_test_image(imgs[i]) os.remove(img_conf[i]) =20 def do_check_event(self, node, sector =3D 0): --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961310; cv=none; d=zoho.com; s=zohoarc; b=XxMPcWDrDBKG4f5eOFa/hthsLgT4Il3+HoWGarF34k5azgrR+5EeiiLYNu+6j3U42KYK5BOnP5WIFgt5m7bC1XICIHmspSf1Fx9Aw892UJ0QX1ZXxfuTX13590XhWi5M3diwo6PxlZqiGGKzZa1pWrzg2wUIo5LEsvAfBo/2Ww8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961310; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Hib8LDUeZOxKc+XMh3OSotH1jg+/2BipmAqM/IMMeug=; b=dnHTKpu5qNGRNE74HEXj1z9S2/PUtEgk9RjHHzHDaYwZHL2zyIFdr0BM3IXdDWAjonfWcs3k70aVLobJoxUVVPNRrUE+n62lpQbI8aPcwqes81jeOZ/Tx3NYC+5cSRrfbJ8OA4DtdhYXvY746PJesbNDO1Uknu60QQKkIfY/3Ng= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961310090709.6749918510615; Tue, 1 Oct 2019 13:21:50 -0700 (PDT) Received: from localhost ([::1]:47798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOea-0007eV-Ka for importer@patchew.org; Tue, 01 Oct 2019 16:21:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54753) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8S-0005CF-RP for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8R-0008F6-P4 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60242) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8P-0008DM-3d; Tue, 01 Oct 2019 15:48:33 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5ACAF10DCC98; Tue, 1 Oct 2019 19:48:32 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E923E5C1D4; Tue, 1 Oct 2019 19:48:31 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 32/67] iotests/151: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:40 +0200 Message-Id: <20191001194715.2796-33-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:48:32 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/151 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151 index 76ae265cc1..bfe2bbb200 100755 --- a/tests/qemu-iotests/151 +++ b/tests/qemu-iotests/151 @@ -20,7 +20,7 @@ =20 import os import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 source_img =3D os.path.join(iotests.test_dir, 'source.' + iotests.imgfmt) target_img =3D os.path.join(iotests.test_dir, 'target.' + iotests.imgfmt) @@ -30,8 +30,8 @@ class TestActiveMirror(iotests.QMPTestCase): potential_writes_in_flight =3D True =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, source_img, '128M') - qemu_img('create', '-f', iotests.imgfmt, target_img, '128M') + create_test_image(source_img, '128M') + create_test_image(target_img, '128M') =20 blk_source =3D {'id': 'source', 'if': 'none', @@ -58,8 +58,8 @@ class TestActiveMirror(iotests.QMPTestCase): self.assertTrue(iotests.compare_images(source_img, target_img), 'mirror target does not match source') =20 - os.remove(source_img) - os.remove(target_img) + remove_test_image(source_img) + remove_test_image(target_img) =20 def doActiveIO(self, sync_source_and_target): # Fill the source image --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962800; cv=none; d=zoho.com; s=zohoarc; b=OJzi5Eq9lhNGk3AT92BMyopZZO6X5EDnfcfmAQ2+j+ZzLOO74OmnsE5xqG3A2LcyMESwY564RzEPm0iLzUWxKWuv/Q3n/ojc/MRqPjQbmKt88NQQEG8oqJtcL/CdMeLd811aUZVWyCs82HX7Lj/SE28xBHICmh4tJOl+YLBZY6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962800; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/0undeQDImZQQCtknex4HXYgfmULxkiwm4OgtnaHsnI=; b=kuYNwnBc9YUpI+IwZxnFEP/89xxhVGHz+81M2syHGqOVePw/EFSkNJHCXv3KbDXOyFppV/+2Mm0CrFcr8nwub1XwhHHWIGqVCOUJF1OD3JdRVidYmVga9lUKDBZKYi+GotlPWUy2gzPNjMc2Ny0iYMt5dQtGurh9ca2CUhxGWxM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962800421841.5202535469617; Tue, 1 Oct 2019 13:46:40 -0700 (PDT) Received: from localhost ([::1]:47972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP2X-0004LJ-H4 for importer@patchew.org; Tue, 01 Oct 2019 16:46:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54777) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8U-0005EJ-Rf for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8T-0008GI-MQ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44268) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8R-0008EQ-Cj; Tue, 01 Oct 2019 15:48:35 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A50B93082E03; Tue, 1 Oct 2019 19:48:34 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 407FA261B3; Tue, 1 Oct 2019 19:48:34 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 33/67] iotests/152: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:41 +0200 Message-Id: <20191001194715.2796-34-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 01 Oct 2019 19:48:34 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/152 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/152 b/tests/qemu-iotests/152 index 732bf5f062..123ca0cd5d 100755 --- a/tests/qemu-iotests/152 +++ b/tests/qemu-iotests/152 @@ -20,20 +20,20 @@ =20 import os import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 test_img =3D os.path.join(iotests.test_dir, 'test.img') target_img =3D os.path.join(iotests.test_dir, 'target.img') =20 class TestUnaligned(iotests.QMPTestCase): def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, test_img, '512') + create_test_image(test_img, 512) self.vm =3D iotests.VM().add_drive(test_img) self.vm.launch() =20 def tearDown(self): self.vm.shutdown() - os.remove(test_img) + remove_test_image(test_img) try: os.remove(target_img) except OSError: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963974; cv=none; d=zoho.com; s=zohoarc; b=MyafFeJP0QZYR90If0z5mR04rUKj+0tTfiqLNRzCqiee0joCrHLqR3RVLKvDI3fGfPBphgHKwdrtyto3CNB4DI5reNRsL0xGmD+mIrcquNe6xOIKvqZ5gIE86zoljXj6u9/Ez2m+agqUalUFGcF/1dbb5pnJxXfDEeQXesfzlE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963974; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=CxLrfYhqzDGZhjVkPpHGm58KEZK0wcT87a8ErbcAcfE=; b=oI7zsYMp8wYp5g2715uKTt48cIh9J6GVlulZtt5Ecg8iJqGMAz+LMEn+jrnE2XaBniBub7oWCKUTQHIpuKqkDdZD6johol/dpx0Hhc4AxGDQQZoZbaWXn9IJwalpak91g1Pg9MAi2hI0zzFNhpVCr1swkUrwZ4vdJ4pZ/T1PPgM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963974008169.82014880435702; Tue, 1 Oct 2019 14:06:14 -0700 (PDT) Received: from localhost ([::1]:48166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPLS-0003t7-7f for importer@patchew.org; Tue, 01 Oct 2019 17:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54802) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8X-0005HX-Bm for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8W-0008HW-3K for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51764) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8T-0008Fw-N9; Tue, 01 Oct 2019 15:48:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EAEB6316D797; Tue, 1 Oct 2019 19:48:36 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 86E9D601B3; Tue, 1 Oct 2019 19:48:36 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 34/67] iotests/155: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:42 +0200 Message-Id: <20191001194715.2796-35-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 01 Oct 2019 19:48:37 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/155 | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/tests/qemu-iotests/155 b/tests/qemu-iotests/155 index e19485911c..4efe0e2237 100755 --- a/tests/qemu-iotests/155 +++ b/tests/qemu-iotests/155 @@ -23,7 +23,7 @@ =20 import os import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 back0_img =3D os.path.join(iotests.test_dir, 'back0.' + iotests.imgfmt) back1_img =3D os.path.join(iotests.test_dir, 'back1.' + iotests.imgfmt) @@ -51,10 +51,10 @@ class BaseClass(iotests.QMPTestCase): target_real_backing =3D None =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, back0_img, '1440K') - qemu_img('create', '-f', iotests.imgfmt, '-b', back0_img, back1_im= g) - qemu_img('create', '-f', iotests.imgfmt, '-b', back1_img, back2_im= g) - qemu_img('create', '-f', iotests.imgfmt, '-b', back2_img, source_i= mg) + create_test_image(back0_img, '1440K') + create_test_image(back1_img, backing_file=3Dback0_img) + create_test_image(back2_img, backing_file=3Dback1_img) + create_test_image(source_img, backing_file=3Dback2_img) =20 self.vm =3D iotests.VM() # Add the BDS via blockdev-add so it stays around after the mirror= block @@ -71,10 +71,10 @@ class BaseClass(iotests.QMPTestCase): =20 if self.existing: if self.target_backing: - qemu_img('create', '-f', iotests.imgfmt, - '-b', self.target_backing, target_img, '1440K') + create_test_image(target_img, '1440K', \ + backing_file=3Dself.target_backing) else: - qemu_img('create', '-f', iotests.imgfmt, target_img, '1440= K') + create_test_image(target_img, '1440K') =20 if self.cmd =3D=3D 'blockdev-mirror': options =3D { 'node-name': 'target', @@ -89,14 +89,11 @@ class BaseClass(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - os.remove(source_img) - os.remove(back2_img) - os.remove(back1_img) - os.remove(back0_img) - try: - os.remove(target_img) - except OSError: - pass + remove_test_image(source_img) + remove_test_image(back2_img) + remove_test_image(back1_img) + remove_test_image(back0_img) + remove_test_image(target_img) =20 def findBlockNode(self, node_name, qdev=3DNone): if qdev: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962250; cv=none; d=zoho.com; s=zohoarc; b=cEHeEur33LcoPOKs2muQD6mcNAEXgs5JOuSd3vwkBDD8SCYhT2Qf0mx3wR7gccHiCLCwGB8xCwhRWlrlGqVHP8qE8hTbqfk3peFnuTgZlJHOFLuJADJyAkWlKvVzP11+fxDPexZXKUWQB05O8/kbPSNf7NkmZuaSnM4bRB5tvkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962250; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HsP3/suMJuKJsNxhLilhPvMBNmC3kt1Tki/XZBWjEUw=; b=Mfw+WZkcC/6m+Ukb9X1fSHqbcj07xHUjJXoRfEv8gvoDnMV3FV56B25S1swZhN2jKFI7aZC3yaid6kUBPvuXXg75IaDXx3yq8I75WoIba5L6Gl6+Ss77XZhYn4gFwjMoJIarZA+ct02gnbnluBeSXJOobi7wgcxGlmtqSwz92/U= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962250558411.3273209621012; Tue, 1 Oct 2019 13:37:30 -0700 (PDT) Received: from localhost ([::1]:47902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOtk-0003uQ-PH for importer@patchew.org; Tue, 01 Oct 2019 16:37:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54832) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8a-0005LR-Jv for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8Y-0008Id-J1 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59876) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8W-0008HE-0Z; Tue, 01 Oct 2019 15:48:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4370A18C4279; Tue, 1 Oct 2019 19:48:39 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0E835C1D4; Tue, 1 Oct 2019 19:48:38 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 35/67] iotests/163: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:43 +0200 Message-Id: <20191001194715.2796-36-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 01 Oct 2019 19:48:39 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/163 | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 index 92633f1b21..5c5e23f9fc 100755 --- a/tests/qemu-iotests/163 +++ b/tests/qemu-iotests/163 @@ -19,7 +19,8 @@ # =20 import os, random, iotests, struct, qcow2, sys -from iotests import qemu_img, qemu_io, image_size +from iotests import create_test_image, remove_test_image, qemu_img, qemu_i= o, \ + image_size =20 test_img =3D os.path.join(iotests.test_dir, 'test.img') check_img =3D os.path.join(iotests.test_dir, 'check.img') @@ -82,22 +83,19 @@ class ShrinkBaseClass(iotests.QMPTestCase): =20 def setUp(self): if iotests.imgfmt =3D=3D 'raw': - qemu_img('create', '-f', iotests.imgfmt, test_img, self.image_= len) - qemu_img('create', '-f', iotests.imgfmt, check_img, - self.shrink_size) + create_test_image(test_img, self.image_len) + create_test_image(check_img, self.shrink_size) else: - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'cluster_size=3D' + self.cluster_size + - ',refcount_bits=3D' + self.refcount_bits, - test_img, self.image_len) - qemu_img('create', '-f', iotests.imgfmt, - '-o', 'cluster_size=3D%s'% self.cluster_size, - check_img, self.shrink_size) + create_test_image(test_img, self.image_len, + opts=3D['cluster_size=3D' + self.cluster_siz= e, + 'refcount_bits=3D' + self.refcount_bit= s]) + create_test_image(check_img, self.shrink_size, + opts=3D['cluster_size=3D' + self.cluster_siz= e]) qemu_io('-c', 'write -P 0xff 0 ' + self.shrink_size, check_img) =20 def tearDown(self): - os.remove(test_img) - os.remove(check_img) + remove_test_image(test_img) + remove_test_image(check_img) =20 def image_verify(self): self.assertEqual(image_size(test_img), image_size(check_img), --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569961631; cv=none; d=zoho.com; s=zohoarc; b=SFsfy2BfgaCYHJIAZGoCwhdFW+P3E/ELMhiqYQCM0I6LIro3wJiyv9rnwTafTY6ZyFYFHuEqfhkD/aqmGyLSfJNI1Gz1PcgzCJXyJZzdR6FQwvlptmomgZL/9cG2NcNvJlI28L1dKRYZS5hbDFtzFWLo4xOUPmF0HwSjM+ATab0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569961631; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/3BmHC8BOvclFxL5kaWsOSeiHihBhJhmy/Jhd3gIQzA=; b=mFo40pp6jDXlBqt9WTpMl6jzUGgjrym3wLEtL20pjzbrURp3T6aVaGdb5GuSaOK9PZDKAFNezxsiM+jKHepZqsHOneVsp+ycA7HN2fjtUbT3VPnRWBwtcDJIEiSVEvBfk8yOsJpcYoSku3XyROYNV9SmQ/YyLq87tWGFU680u1s= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569961631856559.2654095050771; Tue, 1 Oct 2019 13:27:11 -0700 (PDT) Received: from localhost ([::1]:47840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOji-00056x-2B for importer@patchew.org; Tue, 01 Oct 2019 16:27:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54850) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8b-0005MW-J9 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8a-0008JP-Gi for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53146) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8Y-0008ID-9I; Tue, 01 Oct 2019 15:48:42 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 872683084025; Tue, 1 Oct 2019 19:48:41 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24540261AA; Tue, 1 Oct 2019 19:48:40 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 36/67] iotests/165: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:44 +0200 Message-Id: <20191001194715.2796-37-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 01 Oct 2019 19:48:41 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/165 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165 index 97dd7102c3..0c92947f72 100755 --- a/tests/qemu-iotests/165 +++ b/tests/qemu-iotests/165 @@ -22,7 +22,7 @@ from __future__ import print_function import os import re import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 disk =3D os.path.join(iotests.test_dir, 'disk') disk_size =3D 0x40000000 # 1G @@ -37,10 +37,10 @@ regions2 =3D ((0x10000000, 0x20000), class TestPersistentDirtyBitmap(iotests.QMPTestCase): =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, disk, str(disk_size)) + create_test_image(disk, disk_size) =20 def tearDown(self): - os.remove(disk) + remove_test_image(disk) =20 def mkVm(self): return iotests.VM().add_drive(disk) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964175; cv=none; d=zoho.com; s=zohoarc; b=MLg+Dm1K0f17WLAxe0wdsT6iS2uJ84i/XJqJ9UJt6wF9X5Lo73Psxd2zkYgyVhpLPIGmPjOVfiwO53ivgH7hrNj6J9XEPuVpCQJSH+TS71J2c+C6nf/EvULOLBcPXqaWK9ETmSS82I7tCXGS02GU0uhYI41NquJL5QmKNgJ0KTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964175; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=yGpYP5sZg0FZikfGxsxwg7Xx+5SbYlqNc1TDqsHbp6w=; b=l/CkW2k2mPQfPTj/Z22Ol7K2TQZHeZ09TrsoVbydA+JI5JSFM/iL/65sLP/FvN6EZ7MnoJmBFV7BHmxK3H1LEvsVyURR/BbEaxG/Oxr0+qysDzU1G3/CnFUxg1oYHu0cSngrC1BWBOPezLAej7SXtd8FzxeVcajbey9JzvacvvQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964175596491.703596865023; Tue, 1 Oct 2019 14:09:35 -0700 (PDT) Received: from localhost ([::1]:48200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPOk-0007WW-24 for importer@patchew.org; Tue, 01 Oct 2019 17:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8e-0005PO-4G for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8c-0008Kr-Vc for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59930) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8a-0008J8-JK; Tue, 01 Oct 2019 15:48:44 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF9A018C4266; Tue, 1 Oct 2019 19:48:43 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A4263D8F; Tue, 1 Oct 2019 19:48:43 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 37/67] iotests/169: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:45 +0200 Message-Id: <20191001194715.2796-38-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 01 Oct 2019 19:48:43 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/169 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169 index 5e978b7b7d..8d41463567 100755 --- a/tests/qemu-iotests/169 +++ b/tests/qemu-iotests/169 @@ -24,7 +24,7 @@ import time import itertools import operator import re -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 =20 disk_a =3D os.path.join(iotests.test_dir, 'disk_a') @@ -39,16 +39,16 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): def tearDown(self): self.vm_a.shutdown() self.vm_b.shutdown() - os.remove(disk_a) - os.remove(disk_b) + remove_test_image(disk_a) + remove_test_image(disk_b) try: os.remove(mig_file) except OSError: pass =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, disk_a, size) - qemu_img('create', '-f', iotests.imgfmt, disk_b, size) + create_test_image(disk_a, size) + create_test_image(disk_b, size) =20 self.vm_a =3D iotests.VM(path_suffix=3D'a').add_drive(disk_a) self.vm_a.launch() --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962494; cv=none; d=zoho.com; s=zohoarc; b=Pb/5IN4pgenekupCVE4RJd34KZovq5X6vpMz5x0nJZJmJG8+VBrKeGFYIUuTYgyZeY+TOzMOWN1j1UQeleq7KgGehN2O2i0TBLVx+HyHLCc8Of5Oqbii4iIRqnfPJXjvuN8YfRQvii14AHLRuUr0N1vxLqcEWJJN5ohFsPjTibU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962494; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=c/1h/jexfpoLWsXnq2Q5M6Y+x2V9PaeEqZAOxNSz0LA=; b=mfPWBtJn6HPP47+igd+Qml95CTjp82DN956S32x8+iwTxT2uoA2W8Tlrbe9KmPUjterIbObtex5CrZ/CZQ7Awy6Lf6S4GC4WnmEQcENHHhx1MNHbvLvYnfkLtOy4Y6ODUbTyfviSkzZl5leZYUv5h/f5nAL/X6uhLuxaMOzfAeA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962494494155.95137610404174; Tue, 1 Oct 2019 13:41:34 -0700 (PDT) Received: from localhost ([::1]:47946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOxg-0000E0-80 for importer@patchew.org; Tue, 01 Oct 2019 16:41:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54928) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8g-0005Rn-04 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8f-0008MF-1R for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58704) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8c-0008KO-Qn; Tue, 01 Oct 2019 15:48: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 2083730832EA; Tue, 1 Oct 2019 19:48:46 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFE3D5D9C9; Tue, 1 Oct 2019 19:48:45 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 38/67] iotests/194: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:46 +0200 Message-Id: <20191001194715.2796-39-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 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.44]); Tue, 01 Oct 2019 19:48:46 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/194 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index c8aeb6d0e4..70cae2d8ef 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@ -20,19 +20,20 @@ # Non-shared storage migration test using NBD server and drive-mirror =20 import iotests +from iotests import create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2', 'qed', 'raw']) =20 -with iotests.FilePath('source.img') as source_img_path, \ - iotests.FilePath('dest.img') as dest_img_path, \ +with iotests.ImagePath('source.img') as source_img_path, \ + iotests.ImagePath('dest.img') as dest_img_path, \ iotests.FilePath('migration.sock') as migration_sock_path, \ iotests.FilePath('nbd.sock') as nbd_sock_path, \ iotests.VM('source') as source_vm, \ iotests.VM('dest') as dest_vm: =20 img_size =3D '1G' - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, source_img_path,= img_size) - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, dest_img_path, i= mg_size) + create_test_image(source_img_path, img_size) + create_test_image(dest_img_path, img_size) =20 iotests.log('Launching VMs...') (source_vm.add_drive(source_img_path) --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964357; cv=none; d=zoho.com; s=zohoarc; b=L4XrBh6pAXtTSBh1gyzPOrkrL4jBSpQHHCJGPy7ELQAH2+i1+nH+N9VcVMi6aRTJzC9GyF+2Cj2ItZZAx5qHLBbJCODbfByUaWnxWJqkXQrcLg7iXLuWpQOZluP3QmjzSAlvTusmOwKc0jG4a6VUtOybzuYaW9/8qHt0Wu3X4ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964357; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=W0rxkDUTLgRE1MBrdxjxZVnlJZTTQFn452pqCsxZxUs=; b=aI2HW1x6kOolZY6OMS1YotU4QJibL393BlqkG4hsdUIQS6hck9RrkxbkMUiVESJH3nvrd0jHewLs3tbEf2oWDrBj4Hi7nhb1eW9wuq7/CIYe8TSNAq8uD3bPEWeZvszS3LpQLaflXFicomb8w47N4Vd1ZVO5ncNEnfqfFaD7yfk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964357615896.2327687231506; Tue, 1 Oct 2019 14:12:37 -0700 (PDT) Received: from localhost ([::1]:48230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPRi-0002HI-Gq for importer@patchew.org; Tue, 01 Oct 2019 17:12:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8i-0005UD-9M for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8h-0008Nq-7N for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8f-0008M5-5l; Tue, 01 Oct 2019 15:48:49 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A52A300CB2B; Tue, 1 Oct 2019 19:48:48 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0285D1001B05; Tue, 1 Oct 2019 19:48:47 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 39/67] iotests/196: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:47 +0200 Message-Id: <20191001194715.2796-40-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 01 Oct 2019 19:48:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/196 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/196 b/tests/qemu-iotests/196 index ec4852a19c..4d6a5fac05 100755 --- a/tests/qemu-iotests/196 +++ b/tests/qemu-iotests/196 @@ -21,7 +21,7 @@ =20 import os import iotests -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 disk =3D os.path.join(iotests.test_dir, 'disk') migfile =3D os.path.join(iotests.test_dir, 'migfile') @@ -31,11 +31,11 @@ class TestInvalidateAutoclear(iotests.QMPTestCase): def tearDown(self): self.vm_a.shutdown() self.vm_b.shutdown() - os.remove(disk) + remove_test_image(disk) os.remove(migfile) =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, disk, '1M') + create_test_image(disk, '1M') =20 self.vm_a =3D iotests.VM(path_suffix=3D'a').add_drive(disk) self.vm_a.launch() --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964599; cv=none; d=zoho.com; s=zohoarc; b=UmmeGRg9xgZZopRySLb1qXeLGLQlLp0SvSVind+RdPBVVNvhzChy5SX6bKZEwcLDS78e8N1YYUcIPYmlcO5F1Mbe16CoIHcwK9+iAJfZJ4EVJwouevQdCUmMKDQ7JzoggzuXzMcyOF3CkUhzztKKRuclmi7lAGwTTJ6PS1M8xwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964599; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=EKP9olGhuHgpVzC7dL3e2WEqZhv/9GFY7pBdRBurG6g=; b=HF6grSis0i8khvRYWMWwvSYmPQb5TcHCL0jKnhRjhu0hUqUzLfrIcxK5iGLADR6VqSDcwAMeIksbhk+3xLIlJyECWueDdInwyLQgzbLWdvHez8gUYhDv2vKEUlI/heDqhx3duVVkEaJNFuJQvj8f/7GxffTaCm3BnYHCfWTs3vI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964599754143.51934149509543; Tue, 1 Oct 2019 14:16:39 -0700 (PDT) Received: from localhost ([::1]:48270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPVe-0005Zh-6e for importer@patchew.org; Tue, 01 Oct 2019 17:16:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8k-0005XI-Ud for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8j-0008PP-Tc for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52072) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8h-0008NW-F9; Tue, 01 Oct 2019 15:48:51 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B4A6AA44AE3; Tue, 1 Oct 2019 19:48:50 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F9F560C5D; Tue, 1 Oct 2019 19:48:50 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 40/67] iotests/199: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:48 +0200 Message-Id: <20191001194715.2796-41-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Tue, 01 Oct 2019 19:48:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/199 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199 index a2c8ecab5a..ec028e1149 100755 --- a/tests/qemu-iotests/199 +++ b/tests/qemu-iotests/199 @@ -21,7 +21,7 @@ import os import iotests import time -from iotests import qemu_img +from iotests import create_test_image, remove_test_image =20 disk_a =3D os.path.join(iotests.test_dir, 'disk_a') disk_b =3D os.path.join(iotests.test_dir, 'disk_b') @@ -33,14 +33,14 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestC= ase): def tearDown(self): self.vm_a.shutdown() self.vm_b.shutdown() - os.remove(disk_a) - os.remove(disk_b) + remove_test_image(disk_a) + remove_test_image(disk_b) os.remove(fifo) =20 def setUp(self): os.mkfifo(fifo) - qemu_img('create', '-f', iotests.imgfmt, disk_a, size) - qemu_img('create', '-f', iotests.imgfmt, disk_b, size) + create_test_image(disk_a, size) + create_test_image(disk_b, size) self.vm_a =3D iotests.VM(path_suffix=3D'a').add_drive(disk_a) self.vm_b =3D iotests.VM(path_suffix=3D'b').add_drive(disk_b) self.vm_b.add_incoming("exec: cat '" + fifo + "'") --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962824; cv=none; d=zoho.com; s=zohoarc; b=Yuzo6sNZgN9r5Cg3+bEenUvMtShvJeiW6QFgQigdVkuhg98sCc0Hx/QDtkpXC4h3yH0VME4RK5iD8IVxYgB1yvqYp5AyLxhB7dIy7rAr327nMLS05AtkduLfV77JBwahRauYRdJZNihbxySJ19nCz+FvyPLs2Ndm5sCYGV+Malw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962824; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ll57q2/Y8zRrZelTseV8mxMR1xQ5qIj5fwcwbe5HAlY=; b=mUU70hbtpEcY7ZNIkLxtOgV9/1A0gGj/DOpEvG01wMuH/jbQOIYUKTvkJ0u2rZvwuyX9qXWRR9SW2N0VhmYoKCehOlTbxjdMH7DRkPXgvJokF89URzjPdHjz+eQYG2QPl4Vb6xKhhGZoYV3sVKM5Rwv40TIrcnhJ4EjbrJLydG4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962824773923.7763728543673; Tue, 1 Oct 2019 13:47:04 -0700 (PDT) Received: from localhost ([::1]:47982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP2x-0004sD-Sq for importer@patchew.org; Tue, 01 Oct 2019 16:46:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55039) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8m-0005ZO-VA for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8l-0008QV-SU for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60744) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8j-0008P2-P1; Tue, 01 Oct 2019 15:48:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A33310C094A; Tue, 1 Oct 2019 19:48:53 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9684D60C5D; Tue, 1 Oct 2019 19:48:52 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 41/67] iotests/202: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:49 +0200 Message-Id: <20191001194715.2796-42-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Tue, 01 Oct 2019 19:48:53 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/202 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/202 b/tests/qemu-iotests/202 index 1271ac9459..f2a77fbe9b 100755 --- a/tests/qemu-iotests/202 +++ b/tests/qemu-iotests/202 @@ -23,18 +23,19 @@ # against regressions. =20 import iotests +from iotests import create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 -with iotests.FilePath('disk0.img') as disk0_img_path, \ - iotests.FilePath('disk1.img') as disk1_img_path, \ +with iotests.ImagePath('disk0.img') as disk0_img_path, \ + iotests.ImagePath('disk1.img') as disk1_img_path, \ iotests.FilePath('disk0-snap.img') as disk0_snap_img_path, \ iotests.FilePath('disk1-snap.img') as disk1_snap_img_path, \ iotests.VM() as vm: =20 img_size =3D '10M' - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk0_img_path, = img_size) - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk1_img_path, = img_size) + create_test_image(disk0_img_path, img_size) + create_test_image(disk1_img_path, img_size) =20 iotests.log('Launching VM...') vm.launch() --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964947; cv=none; d=zoho.com; s=zohoarc; b=BR9nnyoiZOWaT0p1HwSw+JOlUEZHzAp4/y25G5oSyucta2iDHnCt5m59HJCRlqkpxkqDSsSd9oVTV7uVYnWZcL0WF42rC9wJQGq19zjSHQ1qFONzScjJr+f0IBp5Jy3S2GwtgXtvA2MkpmSj3cSahDAI6OOTO0iw1NHmqDMAJRU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964947; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jZzQtKElkqYq6Mmy642/Id5zm6vIWf6+S9fb88xaAIo=; b=O8Ic6sNmqGayz/YyWtyFcKZs4ANBY/5B0SQvkDGIrFKleBhJhu6oH8Ml+MzChRzwSTbWt3kRT2rTHaYwVX+ZNM2afb9XAZ7xn5Y+0bodE1I/PiEK4U34SAiHLt1xQ22GqEsJz19cV6pghTu6dxZkBkQ74G9nGbOvJ3SNitCQTE0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964947496854.7871613455524; Tue, 1 Oct 2019 14:22:27 -0700 (PDT) Received: from localhost ([::1]:48312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPb8-0000vK-6V for importer@patchew.org; Tue, 01 Oct 2019 17:22:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55108) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8q-0005dB-0k for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8o-0008Sk-U7 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:48:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36098) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8m-0008QA-1p; Tue, 01 Oct 2019 15:48:56 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51E2881F18; Tue, 1 Oct 2019 19:48:55 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E036A3D8F; Tue, 1 Oct 2019 19:48:54 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 42/67] iotests/203: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:50 +0200 Message-Id: <20191001194715.2796-43-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 01 Oct 2019 19:48:55 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/203 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/203 b/tests/qemu-iotests/203 index c40fe231ea..ce4bc05e08 100755 --- a/tests/qemu-iotests/203 +++ b/tests/qemu-iotests/203 @@ -23,16 +23,17 @@ # BDRV_POLL_WHILE(). =20 import iotests +from iotests import create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 -with iotests.FilePath('disk0.img') as disk0_img_path, \ - iotests.FilePath('disk1.img') as disk1_img_path, \ +with iotests.ImagePath('disk0.img') as disk0_img_path, \ + iotests.ImagePath('disk1.img') as disk1_img_path, \ iotests.VM() as vm: =20 img_size =3D '10M' - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk0_img_path, = img_size) - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk1_img_path, = img_size) + create_test_image(disk0_img_path, img_size) + create_test_image(disk1_img_path, img_size) =20 iotests.log('Launching VM...') (vm.add_object('iothread,id=3Diothread0') --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962088; cv=none; d=zoho.com; s=zohoarc; b=WWBOdj0NYHXEZCVk4YGG/AEkWSVoKMjiQpiZlVxa7GQQB86FliwaVLPpDMiMYOPAAGHn7vtExr98r8zxeWgE9aBXUrNrWJZJIBXz+Z4AQ67S6TkPAkDcr23DcnHvVOutLfsBwAeYsaCQZMPWXFZGIBk6ETO9kOTH1uuiJRlZQfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962088; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=z1eG6GOvkguX7CjvWgdfAa45Iyo+K1qEOm3bq9UsCYY=; b=bIHmWQn/Rd/wNU8nqEpNZrhjMoVWxxR6BKpU+PQMr/Pmt2KAlw9H9SLYCevLXgI48oZdVUZ1+O3/Xr8z3w3/zqu3Bt9RDZwfwbKhCvYhEa/IgFm/1JRKUVUL9Xbid6etiJDXmWBNFmUJjjPgozkUOaY3PIy8qpdUg56DK3GMTe8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156996208816015.669197260852002; Tue, 1 Oct 2019 13:34:48 -0700 (PDT) Received: from localhost ([::1]:47886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOr4-0001rX-Of for importer@patchew.org; Tue, 01 Oct 2019 16:34:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55137) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8r-0005fb-PV for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8q-0008Tm-LX for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44668) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8o-0008Rv-CQ; Tue, 01 Oct 2019 15:48:58 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9891E2A09B2; Tue, 1 Oct 2019 19:48:57 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 314665C1D4; Tue, 1 Oct 2019 19:48:57 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 43/67] iotests/205: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:51 +0200 Message-Id: <20191001194715.2796-44-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 01 Oct 2019 19:48:57 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/205 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205 index 76f6c5fa2b..343fbc296e 100755 --- a/tests/qemu-iotests/205 +++ b/tests/qemu-iotests/205 @@ -22,7 +22,8 @@ import os import sys import iotests import time -from iotests import qemu_img_create, qemu_io, filter_qemu_io, QemuIoIntera= ctive +from iotests import create_test_image, remove_test_image, \ + qemu_io, filter_qemu_io, QemuIoInteractive =20 nbd_sock =3D os.path.join(iotests.test_dir, 'nbd_sock') nbd_uri =3D 'nbd+unix:///exp?socket=3D' + nbd_sock @@ -31,7 +32,7 @@ disk =3D os.path.join(iotests.test_dir, 'disk') =20 class TestNbdServerRemove(iotests.QMPTestCase): def setUp(self): - qemu_img_create('-f', iotests.imgfmt, disk, '1M') + create_test_image(disk, '1M') =20 self.vm =3D iotests.VM().add_drive(disk) self.vm.launch() @@ -51,7 +52,7 @@ class TestNbdServerRemove(iotests.QMPTestCase): def tearDown(self): self.vm.shutdown() os.remove(nbd_sock) - os.remove(disk) + remove_test_image(disk) =20 def remove_export(self, name, mode=3DNone): if mode is None: --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963242; cv=none; d=zoho.com; s=zohoarc; b=WCRgJz4lbF4mjmHr+phVSHNfXgvx6Du34DkfP3UOKitwwi30lN4qliWgUMpA6A46QO4CH9/Lj712OUz9IzedN0HM0nt9Jg3W53GFMy459P2kQ8vh/s7cehbzsQR7PI8Xwnma1Y/LPWc31EDGax7AxVrlUJtb2uBB4epmglAkYD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963242; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=uKNDRgmiKhprDJPokIesX9WMXQ/uB8HOgqw+yvJfxyc=; b=ofdNiBW3umgNobp7cd0ETdb2CzgGaC8MOqDJ34IkAxwJOezwpbcT8/GhbT+FWITsSw1h8LqJbHbQtbjYz5nmx0a5urt//ua5imFRBPdF/i4hXgPeIOAJpYUefQCN4SfdGS5bT2UC2bZayD+XwNZFKWRXa5LNVUHtDuOP08Iu4G8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963242436239.6315063389951; Tue, 1 Oct 2019 13:54:02 -0700 (PDT) Received: from localhost ([::1]:48036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP9l-00011Q-7L for importer@patchew.org; Tue, 01 Oct 2019 16:54:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8u-0005jh-E6 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8t-0008VW-BD for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35312) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8q-0008TQ-MI; Tue, 01 Oct 2019 15:49:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E319E81DE3; Tue, 1 Oct 2019 19:48:59 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DE625C1D4; Tue, 1 Oct 2019 19:48:59 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 44/67] iotests/208: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:52 +0200 Message-Id: <20191001194715.2796-45-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 01 Oct 2019 19:48:59 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/208 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/208 b/tests/qemu-iotests/208 index dfce6f9fe4..cd565eea43 100755 --- a/tests/qemu-iotests/208 +++ b/tests/qemu-iotests/208 @@ -21,16 +21,17 @@ # blockdev-snapshot-sync. =20 import iotests +from iotests import create_test_image =20 iotests.script_initialize(supported_fmts=3D['generic']) =20 -with iotests.FilePath('disk.img') as disk_img_path, \ +with iotests.ImagePath('disk.img') as disk_img_path, \ iotests.FilePath('disk-snapshot.img') as disk_snapshot_img_path, \ iotests.FilePath('nbd.sock') as nbd_sock_path, \ iotests.VM() as vm: =20 img_size =3D '10M' - iotests.qemu_img_create('-f', iotests.imgfmt, disk_img_path, img_size) + create_test_image(disk_img_path, img_size) =20 iotests.log('Launching VM...') (vm.add_drive(disk_img_path, 'node-name=3Ddrive0-node', interface=3D'n= one') --=20 2.21.0 From nobody Fri May 3 19:24:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962349; cv=none; d=zoho.com; s=zohoarc; b=Q6tkf0lCATJEZFzcRaJ/9kkookjDDMCyxI2YLmW+xYJAeDm+WUdeVjVqnCeQwEwqXKtjH6fQB3a/a1WDnJ06b1VnH0Axcweapgq/rf9VTxHZR2d4XG+RaMJHB14VcB96sLCzqSPrhdFIZd9/cSxoYifYEU/FSalMobeqkLGrGxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962349; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=QYEaerfhdT+S34EzDc5zrHQsnzaMkbuFN9sdhy5mmac=; b=lZ+yLskLtwzRdaypNK4TRJK5i/JqhYrt/Cw3X7El1a2Lbl9e51YhXPcZLHyYG9CSakjhIdhDu0DvebRY1wsv2npH08XjcADAmtZcG11jZ8TW52HjPoIFyqkxy2I3UXPSTzPRY2gRtuoF/vmCJfIcXgjxDgQpB4jXlyyfeKKzlxc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962349927719.3719978837953; Tue, 1 Oct 2019 13:39:09 -0700 (PDT) Received: from localhost ([::1]:47922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFOvI-0005tk-1R for importer@patchew.org; Tue, 01 Oct 2019 16:39:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55201) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8w-0005me-MF for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8v-00004y-EY for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33804) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8t-0008V9-6g; Tue, 01 Oct 2019 15:49:03 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3AB73309BF02; Tue, 1 Oct 2019 19:49:02 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C45945D6D0; Tue, 1 Oct 2019 19:49:01 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 45/67] iotests/208: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:53 +0200 Message-Id: <20191001194715.2796-46-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 01 Oct 2019 19:49:02 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/209 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/209 b/tests/qemu-iotests/209 index a77f884166..eb1215afd7 100755 --- a/tests/qemu-iotests/209 +++ b/tests/qemu-iotests/209 @@ -19,15 +19,16 @@ # =20 import iotests -from iotests import qemu_img_create, qemu_io, qemu_img_verbose, qemu_nbd, \ - file_path +from iotests import create_test_image, qemu_io, qemu_img_verbose, qemu_nbd= , \ + file_path, image_path =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 -disk, nbd_sock =3D file_path('disk', 'nbd-sock') +nbd_sock =3D file_path('nbd-sock') +disk =3D image_path('disk') nbd_uri =3D 'nbd+unix:///exp?socket=3D' + nbd_sock =20 -qemu_img_create('-f', iotests.imgfmt, disk, '1M') +create_test_image(disk, '1M') qemu_io('-f', iotests.imgfmt, '-c', 'write 0 512K', disk) =20 qemu_nbd('-k', nbd_sock, '-x', 'exp', '-f', iotests.imgfmt, disk) --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963457; cv=none; d=zoho.com; s=zohoarc; b=HTKKdfipjapzJ2azO2Ock8c5fBjUtp/o3up83vA8avIYYTvsVji+0wJVsy+/RzMV6qTymSBFswlPwA0S/9TT07Yc4CemPXJYZO2bcHnwtdlBD06xer3Wrt5lxi8tS56iGGLiOVyCsf0G9yPsHyAGK7orMbF0i5PJvK57bOC02cA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963457; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/LyWQWLyvm25Bxuod2yFI2XMGeGcdVI65EaIrIfB3ko=; b=T/M4Ow2CP9mh2/agBQbS9z2Pe9NjjnUldLyGbirEmr3nFwBzu5nwCOfoYHz9idnZLtEMb9zZK+nqOEtxYwQFUTqGkOfmDFFRuenDOuqtqR4NWYYGkRCy5mTk8XNiXxIOe8L+b5yv6+43momyDz1eUClglvvqSZkxtsZVRx0DOSw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963457329642.5136480959551; Tue, 1 Oct 2019 13:57:37 -0700 (PDT) Received: from localhost ([::1]:48072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPDD-0004tj-Mt for importer@patchew.org; Tue, 01 Oct 2019 16:57:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO8y-0005pQ-OY for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO8x-00005y-M6 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38156) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8v-0008WJ-8c; Tue, 01 Oct 2019 15:49:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8196D10CC207; Tue, 1 Oct 2019 19:49:04 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1DA5160619; Tue, 1 Oct 2019 19:49:03 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 46/67] iotests/216: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:54 +0200 Message-Id: <20191001194715.2796-47-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 01 Oct 2019 19:49:04 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/216 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/216 b/tests/qemu-iotests/216 index 7574bcc09f..18f2611da6 100755 --- a/tests/qemu-iotests/216 +++ b/tests/qemu-iotests/216 @@ -20,7 +20,7 @@ # Creator/Owner: Max Reitz =20 import iotests -from iotests import log, qemu_img, qemu_io_silent +from iotests import log, create_test_image, qemu_io_silent =20 # Need backing file support iotests.script_initialize(supported_fmts=3D['qcow2', 'qcow', 'qed', 'vmdk'= ]) @@ -42,17 +42,16 @@ log('') # A COR filter node, however, can request the proper permissions for # its child and therefore is not hit by this issue. =20 -with iotests.FilePath('base.img') as base_img_path, \ - iotests.FilePath('top.img') as top_img_path, \ +with iotests.ImagePath('base.img') as base_img_path, \ + iotests.ImagePath('top.img') as top_img_path, \ iotests.VM() as vm: =20 log('--- Setting up images ---') log('') =20 - assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') = =3D=3D 0 + assert create_test_image(base_img_path, '64M') =3D=3D 0 assert qemu_io_silent(base_img_path, '-c', 'write -P 1 0M 1M') =3D=3D 0 - assert qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path, - top_img_path) =3D=3D 0 + assert create_test_image(top_img_path, backing_file=3Dbase_img_path) = =3D=3D 0 assert qemu_io_silent(top_img_path, '-c', 'write -P 2 1M 1M') =3D=3D 0 =20 log('Done') --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963712; cv=none; d=zoho.com; s=zohoarc; b=mL/4TIa60Eu5aJueC8EY9HHmNFnMmdhm0lRch3NH2g1kaFCDcUHVVjMYkYQ7YLFXyxe809Ahzl5rtm1N1B/a4+i55hmqb1njN40CRX/yAdaOYAYFaiSr0sG0ECIkBcJzXhgsnOOjDcKsc86D/O47cLZWayV3nfwuwIpD2w1G/fo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963712; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=wb0OzVf9Up0Kuaz4A267yY9u7bAjk3AuAQWF+3FFwU0=; b=O4l1eSCl2a0avXKQRACgIL9fxy2Y7Hgh7TtsJUm3/f53/IGlIklN+XnFLOovXAhXCt2Hz71yYfUENa3dcpKVCTBDyKIhhGpoPrUyqRdxobVAOo+YjWCEKO46idbME7qCOKFehz9Vmz410Wqf9PipYAb919dLVRSPt+PMEpsYbFY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963712424942.3214887516815; Tue, 1 Oct 2019 14:01:52 -0700 (PDT) Received: from localhost ([::1]:48126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPHK-0000nE-6Y for importer@patchew.org; Tue, 01 Oct 2019 17:01:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55242) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO93-0005ux-3x for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO91-00007G-5M for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58824) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO8x-00005n-Hp; Tue, 01 Oct 2019 15:49:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA03430860D5; Tue, 1 Oct 2019 19:49:06 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 64E261001B08; Tue, 1 Oct 2019 19:49:06 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 47/67] iotests/218: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:55 +0200 Message-Id: <20191001194715.2796-48-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 01 Oct 2019 19:49:06 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/218 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/218 b/tests/qemu-iotests/218 index e18e31076b..6f6fe6588e 100755 --- a/tests/qemu-iotests/218 +++ b/tests/qemu-iotests/218 @@ -27,7 +27,7 @@ # Creator/Owner: Max Reitz =20 import iotests -from iotests import log, qemu_img, qemu_io_silent +from iotests import log, create_test_image, qemu_io_silent =20 iotests.script_initialize(supported_fmts=3D['qcow2', 'raw']) =20 @@ -142,9 +142,9 @@ log('=3D=3D=3D Cancel mirror job from throttled node by= quitting =3D=3D=3D') log('') =20 with iotests.VM() as vm, \ - iotests.FilePath('src.img') as src_img_path: + iotests.ImagePath('src.img') as src_img_path: =20 - assert qemu_img('create', '-f', iotests.imgfmt, src_img_path, '64M') = =3D=3D 0 + assert create_test_image(src_img_path, '64M') =3D=3D 0 assert qemu_io_silent('-f', iotests.imgfmt, src_img_path, '-c', 'write -P 42 0M 64M') =3D=3D 0 =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569965190; cv=none; d=zoho.com; s=zohoarc; b=JA8On65sFh02EHHmhIlO1UVb+RKPBFfMQ7zc7HtO+xkawP0uLeRiphk4GK557pX+kId/99iRc4sb6AvPtUSBFdTuKIm1FUv/f9qqZ8jf8lAqcFLJzPhRgtCr2TIs10Nxcpqq2b7PnuQyuhE03J5nz9XL5BNTp35dZLmp7IQb3PE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569965190; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=isRm7YURrWVZGrmjZh0HewmS3ACSC6kQBFhR+tFD13Y=; b=LjE2mWnHxY63t4zSOmZg4CJX3oFSKQIwSxL4KVUxBUcH1/i3g8NjtUXIcmcIpGvFHWhJS02CR2m/Tc2PtZa2ySwETRj/owfJQ9bm31VUCixi2f7PmYOOiqD3hxehLkOMxDcVRGhE7r7ezkCO+N7HcAko+g5WcU5/L4/YlE5vCiM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569965190306464.73653191807136; Tue, 1 Oct 2019 14:26:30 -0700 (PDT) Received: from localhost ([::1]:48346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPfA-0004Xk-VF for importer@patchew.org; Tue, 01 Oct 2019 17:26:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55305) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO99-000681-2M for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO97-0000Bg-1B for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60366) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO91-00006h-5e; Tue, 01 Oct 2019 15:49:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1AC4910DCC94; Tue, 1 Oct 2019 19:49:09 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAA3D60619; Tue, 1 Oct 2019 19:49:08 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 48/67] iotests/219: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:56 +0200 Message-Id: <20191001194715.2796-49-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:49:09 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/219 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/219 b/tests/qemu-iotests/219 index 9ae27cb04e..37e3c70aef 100755 --- a/tests/qemu-iotests/219 +++ b/tests/qemu-iotests/219 @@ -20,6 +20,7 @@ # Check using the job-* QMP commands with block jobs =20 import iotests +from iotests import create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 @@ -177,11 +178,11 @@ def test_job_lifecycle(vm, job, job_args, has_ready= =3DFalse): iotests.log(vm.qmp('query-jobs')) =20 =20 -with iotests.FilePath('disk.img') as disk_path, \ +with iotests.ImagePath('disk.img') as disk_path, \ iotests.FilePath('copy.img') as copy_path, \ iotests.VM() as vm: =20 - iotests.qemu_img_create('-f', iotests.imgfmt, disk_path, str(img_size)) + create_test_image(disk_path, img_size) iotests.qemu_io('-c', 'write 0 %i' % (img_size), '-f', iotests.imgfmt, disk_path) =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569965387; cv=none; d=zoho.com; s=zohoarc; b=LyaBaSBprskt57m5X+/FAs0JCGBtS2CMdphD1zBQ4a/3ZFFm7xiO5Dz5JBwXIlz4sMxkirdTAViLTsLYfg8GUOMxoxHOcupDhdCwpNqJgMz7t+XRYYEFsnxY+RtKccfeBPfTCg+WJAI5vTYBnAmXXrmTBwEoffmQQetrTmTXM6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569965387; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=RV98uW/tf75GGiZiRwxdpjLgnB0eH+YTT0G4luAqQR8=; b=e2dS+L90jxGVCumcPn6Eb+Ov7bDmcUuQrfzn3Hzh+0CKSK7DHewQhgXrWJgf2htSyatRweHD8CCcrICVcH1xMhq278VmH1DXY97/5r1w7t7tsWCB6yU9ESydCaCAVv2zBK5oFuEZmms9YGD82viqvSVf34vt8CGpJ+u88TZ4v38= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569965387110222.5208920362885; Tue, 1 Oct 2019 14:29:47 -0700 (PDT) Received: from localhost ([::1]:48382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPiL-00075b-5v for importer@patchew.org; Tue, 01 Oct 2019 17:29:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55333) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9B-00069F-2W for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO99-0000D1-3k for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43950) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO93-00007Z-1B; Tue, 01 Oct 2019 15:49:14 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 664113090FC9; Tue, 1 Oct 2019 19:49:11 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02D2D5C1D4; Tue, 1 Oct 2019 19:49:10 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 49/67] iotests/222: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:57 +0200 Message-Id: <20191001194715.2796-50-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 01 Oct 2019 19:49:11 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/222 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222 index ffa88d4bb9..7ae76c1be1 100644 --- a/tests/qemu-iotests/222 +++ b/tests/qemu-iotests/222 @@ -22,7 +22,7 @@ # Creator/Owner: John Snow =20 import iotests -from iotests import log, qemu_img, qemu_io, qemu_io_silent +from iotests import log, create_test_image, qemu_io, qemu_io_silent =20 iotests.script_initialize(supported_fmts=3D['qcow2', 'qcow', 'qed', 'vmdk', 'vhdx', 'raw'], @@ -46,16 +46,16 @@ remainder =3D [("0xd5", "0x108000", "32k"), # Right-en= d of partial-left [1] ("0xdc", "32M", "32k"), # Left-end of partial-right [2] ("0xcd", "0x3ff0000", "64k")] # patterns[3] =20 -with iotests.FilePath('base.img') as base_img_path, \ - iotests.FilePath('fleece.img') as fleece_img_path, \ +with iotests.ImagePath('base.img') as base_img_path, \ + iotests.ImagePath('fleece.img') as fleece_img_path, \ iotests.FilePath('nbd.sock') as nbd_sock_path, \ iotests.VM() as vm: =20 log('--- Setting up images ---') log('') =20 - assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') = =3D=3D 0 - assert qemu_img('create', '-f', "qcow2", fleece_img_path, '64M') =3D= =3D 0 + assert create_test_image(base_img_path, '64M') =3D=3D 0 + assert create_test_image(fleece_img_path, '64M', fmt=3D'qcow2') =3D=3D= 0 =20 for p in patterns: qemu_io('-f', iotests.imgfmt, --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964027; cv=none; d=zoho.com; s=zohoarc; b=evVsEA9K0/wtakAfgSpiYyL/kne72S1wXbv4vPbpIW6w4tRGt0O3zwsf8gW+IdsC/o85UZ8wsyjrGWsEc0x/vdIa5kvn1Jxbb7BgFX1MwWjZQuPDaRAyHhAiDh3fPM2yvLSH2LjKyogGvOyMboGtgj5C43+WN+dmnFj5eAoSeq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964027; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/HTU9J2oWbPXYBOySSTsQEB4EVNkfYqLVLmR32qfZAc=; b=XZUBM+i0TRhlnanmjHILeH7w6lejPbL8FEjfTs+tmkqB26+TMuCsCS/tXlAiI1SLsBmNzFORGx2pePtpdBMvZvFNoEcH9YxaDe7X4Fdh8rLr1o1ECLdCNO6lUIfTb8RZwT2ycbPURb6CcGA8EgC1/9HLTg+hn0A3T4+3DlfADeo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964027389953.0920426402852; Tue, 1 Oct 2019 14:07:07 -0700 (PDT) Received: from localhost ([::1]:48174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPMP-0005D8-GM for importer@patchew.org; Tue, 01 Oct 2019 17:07:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55356) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9D-0006AW-1r for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9B-0000E6-0U for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36220) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO95-00009Z-0V; Tue, 01 Oct 2019 15:49:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C8A99811D8; Tue, 1 Oct 2019 19:49:13 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6403D60C83; Tue, 1 Oct 2019 19:49:13 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 50/67] iotests/224: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:58 +0200 Message-Id: <20191001194715.2796-51-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 01 Oct 2019 19:49:13 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/224 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/224 b/tests/qemu-iotests/224 index e227d3ab3c..e9f5729c33 100755 --- a/tests/qemu-iotests/224 +++ b/tests/qemu-iotests/224 @@ -21,8 +21,9 @@ # Creator/Owner: Max Reitz =20 import iotests -from iotests import log, qemu_img, qemu_io_silent, filter_qmp_testfiles, \ - filter_qmp_imgfmt, filter_json_filename +from iotests import log, create_test_image, qemu_io_silent, \ + filter_qmp_testfiles, filter_qmp_imgfmt, \ + filter_json_filename import json import re =20 @@ -47,17 +48,14 @@ for filter_node_name in False, True: log('--- filter_node_name: %s ---' % filter_node_name) log('') =20 - with iotests.FilePath('base.img') as base_img_path, \ - iotests.FilePath('mid.img') as mid_img_path, \ - iotests.FilePath('top.img') as top_img_path, \ + with iotests.ImagePath('base.img') as base_img_path, \ + iotests.ImagePath('mid.img') as mid_img_path, \ + iotests.ImagePath('top.img') as top_img_path, \ iotests.VM() as vm: =20 - assert qemu_img('create', '-f', iotests.imgfmt, - base_img_path, '64M') =3D=3D 0 - assert qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_pat= h, - mid_img_path) =3D=3D 0 - assert qemu_img('create', '-f', iotests.imgfmt, '-b', mid_img_path, - top_img_path) =3D=3D 0 + assert create_test_image(base_img_path, '64M') =3D=3D 0 + assert create_test_image(mid_img_path, backing_file=3Dbase_img_pat= h) =3D=3D 0 + assert create_test_image(top_img_path, backing_file=3Dmid_img_path= ) =3D=3D 0 =20 # Something to commit assert qemu_io_silent(mid_img_path, '-c', 'write -P 1 0 1M') =3D= =3D 0 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569965815; cv=none; d=zoho.com; s=zohoarc; b=ApA3sCCLDByKxv/ksXejAlvn9XCsnknRj8x6jbqT62O8MbHKZVBqZ++iqclsZoAkUAqTCxTenRBcg9a7th03Dk7hONKd3+Ns2W5tuQbigfwAdt7CO2iyIRPyNHTs6iGG/G0CT9Uvq0AT7w+vWPblAvGOyJD+Vg5UpOJTCsT8iH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569965815; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=bk9oRgUUSmAIgBvRTQEXizOg1hDMJUZ2ETstqlWzCjE=; b=RBZn09lP7hRAcvreUfwY2IVBLvp8YYcMETN9DzJ+ndgFsDYtr8YKykF5XevwJCZSkWcxstPJgzeKc8HxtSQV2ZD0kRi73C8+BK9rX7y7btCi6SUG4pYym1e5ROrorTr4ejVstabGPXKYi4lNKt/jvPPPYHwIUDp3mEO1+0DFNPA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569965815026553.7861274696713; Tue, 1 Oct 2019 14:36:55 -0700 (PDT) Received: from localhost ([::1]:48414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPpF-0001kl-8g for importer@patchew.org; Tue, 01 Oct 2019 17:36:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55355) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9D-0006AU-2b for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9A-0000E1-WE for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33926) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO96-0000BM-V4; Tue, 01 Oct 2019 15:49:17 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20909309BF02; Tue, 1 Oct 2019 19:49:16 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ADBDE60E1C; Tue, 1 Oct 2019 19:49:15 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 51/67] iotests/228: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:46:59 +0200 Message-Id: <20191001194715.2796-52-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 01 Oct 2019 19:49:16 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/228 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/228 b/tests/qemu-iotests/228 index e507db4f27..ad7966fc8f 100755 --- a/tests/qemu-iotests/228 +++ b/tests/qemu-iotests/228 @@ -21,8 +21,9 @@ # Creator/Owner: Max Reitz =20 import iotests -from iotests import log, qemu_img, filter_testfiles, filter_imgfmt, \ - filter_qmp_testfiles, filter_qmp_imgfmt, filter_json_filename +from iotests import log, create_test_image, remove_test_image, \ + filter_testfiles, filter_imgfmt, filter_qmp_testfiles, \ + filter_qmp_imgfmt, filter_json_filename =20 # Need backing file and change-backing-file support iotests.script_initialize(supported_fmts=3D['qcow2', 'qed']) @@ -46,14 +47,14 @@ def log_node_info(node): log('') =20 =20 -with iotests.FilePath('base.img') as base_img_path, \ - iotests.FilePath('top.img') as top_img_path, \ +with iotests.ImagePath('base.img') as base_img_path, \ + iotests.ImagePath('top.img') as top_img_path, \ iotests.VM() as vm: =20 - assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') = =3D=3D 0 + assert create_test_image(base_img_path, '64M') =3D=3D 0 # Choose a funny way to describe the backing filename - assert qemu_img('create', '-f', iotests.imgfmt, '-b', - 'file:' + base_img_path, top_img_path) =3D=3D 0 + assert create_test_image(top_img_path, + backing_file=3D('file:' + base_img_path)) =3D= =3D 0 =20 vm.launch() =20 @@ -167,8 +168,8 @@ with iotests.FilePath('base.img') as base_img_path, \ # (because qemu cannot "canonicalize"/"resolve" the backing # filename unless the backing file is opened implicitly with the # overlay) - assert qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path, - top_img_path) =3D=3D 0 + remove_test_image(top_img_path) + assert create_test_image(top_img_path, backing_file=3Dbase_img_path) = =3D=3D 0 =20 # You can only reliably override backing options by using a node # reference (or by specifying file.filename, but, well...) --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569962688; cv=none; d=zoho.com; s=zohoarc; b=iWO+kn0GBK2wV8PukwEeuOGmOXnr7F9KIz9gdePh2Vdxf7amYzvNfTRzNOkLygj95ZcCKRJRKpB+BJvYczeT50VPoNqsQTlvFsUEIqkqVN00GEKcIe2VulD4SzaKx+KNZozBx1RCiUTHHb2qgbDh33svB7N+eYRf3QAtAiNhCZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569962688; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=9Wg2DFy75MbEqBzxgjSFvHrbMd0dD5B702QXMsGitmg=; b=TxuPgk/dbNAS7IlebM804S04DKthxBNhFBDtm3Xi1zKkK0yeD/+8PEnb/zI4pyRJRVhcvcidvAsyWQ6MQQj7wvsKviEcpThIWSyRUF4Kj8IYyAtwWBIDIi15MRV+6+loHFG+9YzbMfiZOgViUycgwYo2rP3J9dWEpNxTJKNFKZA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569962688283226.55987483783144; Tue, 1 Oct 2019 13:44:48 -0700 (PDT) Received: from localhost ([::1]:47966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP0k-0003Ll-7Q for importer@patchew.org; Tue, 01 Oct 2019 16:44:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55397) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9F-0006E9-DZ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9E-0000Fo-3e for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO99-0000CQ-4v; Tue, 01 Oct 2019 15:49:20 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 664DC308FFB1; Tue, 1 Oct 2019 19:49:18 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F29041001B05; Tue, 1 Oct 2019 19:49:17 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 52/67] iotests/234: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:00 +0200 Message-Id: <20191001194715.2796-53-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 01 Oct 2019 19:49:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/234 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/234 b/tests/qemu-iotests/234 index 3de6ab2341..f200af3f27 100755 --- a/tests/qemu-iotests/234 +++ b/tests/qemu-iotests/234 @@ -21,19 +21,20 @@ # that is built with individually created nodes =20 import iotests +from iotests import create_test_image import os =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 -with iotests.FilePath('img') as img_path, \ - iotests.FilePath('backing') as backing_path, \ +with iotests.ImagePath('img') as img_path, \ + iotests.ImagePath('backing') as backing_path, \ iotests.FilePath('mig_fifo_a') as fifo_a, \ iotests.FilePath('mig_fifo_b') as fifo_b, \ iotests.VM(path_suffix=3D'a') as vm_a, \ iotests.VM(path_suffix=3D'b') as vm_b: =20 - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, backing_path, '6= 4M') - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, img_path, '64M') + create_test_image(backing_path, '64M') + create_test_image(img_path, '64M') =20 os.mkfifo(fifo_a) os.mkfifo(fifo_b) --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963268; cv=none; d=zoho.com; s=zohoarc; b=DsitDQUvxrx60jD5EzUnn56hHPYjkF8icTYNcOjegX/C+l7jaHbMNZjkgOgc5zC5nKpqvQn6NVOPRW5xwcB8XUEKm1tpja15keFdrItkASrbZ98LClspp9b/m1x0Z/Fbg+i1hqWNBXnfsFYMu5Zb4GZch5QRzQLJ/dLB8C5XUlU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963268; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OOEtJSqSutHgBgu0TbHHeURCGL/MIb7YpDQij9KC/TI=; b=BPeqcGg2ZxTCBPnOiI8oSM3vjP9ZyvX4ggT5VIbzNSOjtJ6IvFvNAu5KOhOtvfJpkLXQAmTMbn1ZZYaqH3ms59Yjoh326Hr2lqaFi3gmordokpR4RqqQIzwNlJZK/EFnds1bvOvsM5v4dK99jDFrJwtxxuiNDGIOjysmI8ow8Ho= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963268901223.85609974035185; Tue, 1 Oct 2019 13:54:28 -0700 (PDT) Received: from localhost ([::1]:48040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPAB-0001HG-3R for importer@patchew.org; Tue, 01 Oct 2019 16:54:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55414) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9G-0006FT-7q for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9F-0000GQ-Av for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44004) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9C-0000Dk-U3; Tue, 01 Oct 2019 15:49:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB2333090FC7; Tue, 1 Oct 2019 19:49:20 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44F0E60C5D; Tue, 1 Oct 2019 19:49:20 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 53/67] iotests/235: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:01 +0200 Message-Id: <20191001194715.2796-54-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 01 Oct 2019 19:49:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/235 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235 index 9e88c65b93..3326d205b7 100755 --- a/tests/qemu-iotests/235 +++ b/tests/qemu-iotests/235 @@ -21,7 +21,7 @@ import sys import os import iotests -from iotests import qemu_img_create, qemu_io, file_path, log +from iotests import create_test_image, qemu_io, image_path, log =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) =20 @@ -42,11 +42,10 @@ iotests.script_initialize(supported_fmts=3D['qcow2']) =20 size =3D 1 * 1024 * 1024 * 1024 =20 -disk =3D file_path('disk') +disk =3D image_path('disk') =20 # prepare source image -qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=3Dmetadata', di= sk, - str(size)) +create_test_image(disk, size, opts=3D['preallocation=3Dmetadata']) =20 vm =3D QEMUMachine(iotests.qemu_prog) vm.add_args('-machine', 'accel=3Dkvm:tcg') --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963475; cv=none; d=zoho.com; s=zohoarc; b=AS1Fgqpvip+Mfc+H6yFjTTMLhCjPBnwU4EWISUr9SRUNZfvP84oVZO8Jb1tJ82HQd52xydovhBwxkaUKbY1vP8oXdAGmtAjWwWk2j1ZOrHwikwm/Ofw9grahVrr/nEEzz/F2BKcxUGuspXxcIsfP/Oyw7cY7DVCXa9E/vJeRc3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963475; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=PXuyt72DIiisnsG3kzJHsWTGcS8d/3oHoeoTUcJ/dtU=; b=LfHn3eGxcQX+m+gFYaSpN/yTk4lnLoGRjFkrYKHyNGuSsZxpO+tA170FgYuxr3Aas5yf2MT+vfeVtgL4Nfn6ycgNESSaHfdrSy9NVkStl5zFEbLqVxwISPFsx82T2aoTja0ykPCO+JGCPc8RXacQ7eDGbzWSJEW0B4BHsI6dyCQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963475168677.1495255575468; Tue, 1 Oct 2019 13:57:55 -0700 (PDT) Received: from localhost ([::1]:48074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPDT-0005Ds-6d for importer@patchew.org; Tue, 01 Oct 2019 16:57:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55429) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9H-0006GZ-7C for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9G-0000H0-5R for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44822) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9D-0000FG-MH; Tue, 01 Oct 2019 15:49:23 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE8FB2A09D2; Tue, 1 Oct 2019 19:49:22 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 89D69261D0; Tue, 1 Oct 2019 19:49:22 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 54/67] iotests/236: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:02 +0200 Message-Id: <20191001194715.2796-55-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 01 Oct 2019 19:49:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/236 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/236 b/tests/qemu-iotests/236 index b88779eb0b..ef1d732510 100755 --- a/tests/qemu-iotests/236 +++ b/tests/qemu-iotests/236 @@ -20,7 +20,7 @@ # owner=3Djsnow@redhat.com =20 import iotests -from iotests import log +from iotests import log, create_test_image =20 iotests.script_initialize(supported_fmts=3D['generic']) size =3D 64 * 1024 * 1024 @@ -41,11 +41,11 @@ def query_bitmaps(vm): return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []= ) for device in res['return'] } } =20 -with iotests.FilePath('img') as img_path, \ +with iotests.ImagePath('img') as img_path, \ iotests.VM() as vm: =20 log('--- Preparing image & VM ---\n') - iotests.qemu_img_create('-f', iotests.imgfmt, img_path, str(size)) + create_test_image(img_path, size) vm.add_drive(img_path) vm.launch() =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963116; cv=none; d=zoho.com; s=zohoarc; b=Cm8P1sq23sSq8KPjooQ8x9af2vEImwD99ol7V9ebCoELRfyUf2b338/SsnUxcaFikz0meUDXEzrodyaNu/mRjFxWFnMvxmuf0czhcQLLeB3W7IDkQlj0IwjLlropLXTVOg8/ScUlUzQ2JDRgdxGLktmQwvA0KwkroPtAS4mcXcE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963116; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=S8/0Q/Jf1Jcq3oM8twS5itNrAJm9GPgPtbVOX5krdH4=; b=WJrY7H9n8rlOfT/Exg2h9UevWvc9u9Fs6oWxgAxQHrvAMUV/qu6Ay4pLFArtTYHYtGkkQxlfZoYYg/QiCd7w2671eem3nAhVbVC9Qx/PLwK7+dTit2XBK/sE4+h+Ssi3sicPRrDTmYzfaLE05UE5xE0hRAPtP45QM+P+PI+luuM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963116622236.1500380158335; Tue, 1 Oct 2019 13:51:56 -0700 (PDT) Received: from localhost ([::1]:48016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFP7a-0007Uw-4G for importer@patchew.org; Tue, 01 Oct 2019 16:51:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55458) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9J-0006KM-MF for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9I-0000IF-IM for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35426) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9F-0000GU-V2; Tue, 01 Oct 2019 15:49:26 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F82781DE3; Tue, 1 Oct 2019 19:49:25 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF8865C219; Tue, 1 Oct 2019 19:49:24 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 55/67] iotests/237: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:03 +0200 Message-Id: <20191001194715.2796-56-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 01 Oct 2019 19:49:25 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/237 | 11 +++++------ tests/qemu-iotests/237.out | 6 ------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237 index 34ff4b55db..179eae87dc 100755 --- a/tests/qemu-iotests/237 +++ b/tests/qemu-iotests/237 @@ -22,7 +22,7 @@ =20 import math import iotests -from iotests import imgfmt +from iotests import imgfmt, create_test_image =20 iotests.script_initialize(supported_fmts=3D['vmdk'], # All options are ignored @@ -38,9 +38,9 @@ def blockdev_create(vm, options): iotests.log("") =20 with iotests.FilePath('t.vmdk') as disk_path, \ - iotests.FilePath('t.vmdk.1') as extent1_path, \ - iotests.FilePath('t.vmdk.2') as extent2_path, \ - iotests.FilePath('t.vmdk.3') as extent3_path, \ + iotests.ImagePath('t.vmdk.1') as extent1_path, \ + iotests.ImagePath('t.vmdk.2') as extent2_path, \ + iotests.ImagePath('t.vmdk.3') as extent3_path, \ iotests.VM() as vm: =20 # @@ -175,8 +175,7 @@ with iotests.FilePath('t.vmdk') as disk_path, \ iotests.log("") =20 for path in [ extent1_path, extent2_path, extent3_path ]: - msg =3D iotests.qemu_img_pipe('create', '-f', imgfmt, path, '0') - iotests.log(msg, [iotests.filter_testfiles]) + assert create_test_image(path, 0) =3D=3D 0 =20 vm.add_blockdev('driver=3Dfile,filename=3D%s,node-name=3Dext1' % (exte= nt1_path)) vm.add_blockdev('driver=3Dfile,filename=3D%s,node-name=3Dext2' % (exte= nt2_path)) diff --git a/tests/qemu-iotests/237.out b/tests/qemu-iotests/237.out index a8c800bfad..c32b970363 100644 --- a/tests/qemu-iotests/237.out +++ b/tests/qemu-iotests/237.out @@ -129,12 +129,6 @@ Job failed: Cannot find device=3Dthis doesn't exist no= r node_name=3Dthis doesn't exi =20 =3D=3D=3D Other subformats =3D=3D=3D =20 -Formatting 'TEST_DIR/PID-t.vmdk.1', fmt=3Dvmdk size=3D0 compat6=3Doff hwve= rsion=3Dundefined - -Formatting 'TEST_DIR/PID-t.vmdk.2', fmt=3Dvmdk size=3D0 compat6=3Doff hwve= rsion=3Dundefined - -Formatting 'TEST_DIR/PID-t.vmdk.3', fmt=3Dvmdk size=3D0 compat6=3Doff hwve= rsion=3Dundefined - =3D=3D Missing extent =3D=3D =20 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": = {"driver": "vmdk", "file": "node0", "size": 33554432, "subformat": "monolit= hicFlat"}}} --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569966153; cv=none; d=zoho.com; s=zohoarc; b=e9XZX3dDtgYkMBUtWkR1CDL4ewUKgfGmMjgnq5qpmsm/fxDwNOLgXeLoAPj9+kKlqZYz0lQNNo2wNlXZfFkH8UnVREy6VTRv0MnpU0OCi7wCDafTuB2nX20DIpyFMUVNX8SYC68r30sS/zJgl4ipY+gODmGbs6GrvvJxr/ZWP+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569966153; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jsFPLLudk5xOtNTp0uS2UVy2GCewtlusQiCuPNFPHDU=; b=IILWwCx2XO2En8cqRc5fKKvEkDYhsiRLevQ4OPzaFS3S4kZA9m5zaa5FCFUFYvBl8HQSK/gK2/ZYFTwkTSxur+YfSOTDCCkW7yRppX7zd+EicXYJHxG7G13vZd+j5IFXmVmA/ZxFaMwIl9yZeKLrpAIJZ5CGV3uyULwmzdVyCOs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569966153317813.766992426476; Tue, 1 Oct 2019 14:42:33 -0700 (PDT) Received: from localhost ([::1]:48484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPuf-0005sb-Id for importer@patchew.org; Tue, 01 Oct 2019 17:42:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55472) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9N-0006Oc-32 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9K-0000JH-QN for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60218) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9I-0000Ho-8p; Tue, 01 Oct 2019 15:49:28 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 88B3E18C427F; Tue, 1 Oct 2019 19:49:27 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E16D1001B05; Tue, 1 Oct 2019 19:49:26 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 56/67] iotests/242: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:04 +0200 Message-Id: <20191001194715.2796-57-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 01 Oct 2019 19:49:27 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/242 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 index 333fb8b56c..bccd8a9fdf 100755 --- a/tests/qemu-iotests/242 +++ b/tests/qemu-iotests/242 @@ -21,14 +21,14 @@ import iotests import json import struct -from iotests import qemu_img_create, qemu_io, qemu_img_pipe, \ - file_path, img_info_log, log, filter_qemu_io +from iotests import create_test_image, remove_test_image, qemu_io, \ + qemu_img_pipe, image_path, img_info_log, log, filter_qemu_io =20 iotests.script_initialize(supported_fmts=3D['qcow2'], # compat=3D1.1 is needed for dirty bitmaps unsupported_imgopts=3D['compat=3D0.10']) =20 -disk =3D file_path('disk') +disk =3D image_path('disk') chunk =3D 256 * 1024 bitmap_flag_unknown =3D 1 << 2 # flag_offset =3D 5*cluster_size + flag_offset_in_bitmap_directory_entry @@ -74,7 +74,7 @@ def toggle_flag(offset): f.write(struct.pack("B", toggled)) =20 =20 -qemu_img_create('-f', iotests.imgfmt, disk, '1M') +create_test_image(disk, '1M') =20 for num in range(1, 4): disabled =3D False @@ -95,7 +95,8 @@ vm.shutdown() =20 num +=3D 1 log('\nTest {}'.format(num)) -qemu_img_create('-f', iotests.imgfmt, disk, '1M') +remove_test_image(disk) +create_test_image(disk, '1M') add_bitmap(1, True, False) log('Write an unknown bitmap flag \'{}\' into a new QCOW2 image at offset = {}' .format(hex(bitmap_flag_unknown), flag_offset)) --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964245; cv=none; d=zoho.com; s=zohoarc; b=bzrJwfgZBsqmkMzA10uc9sDhdiVHZw+gNU5MynN/B4G7yNTBQqyFvu7vqvF74FjPkRRBeXWgMVX2nPwUBYA8ZkD/34060RMxk+tIt8tu6lMTN2isWDhlsQfFHF+aLlkxmHZ78NcglAxEf8WKrssaBT2cZY/ZBTAQJ3bY/3dfPaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964245; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=T85qgqauG3X2H6GKoUNa/P82qAfWflYL6Vlcc9Y5bCg=; b=NI68gzu34t52C4YTe6L6GBid8vuKSohFN133+MZXEpT3VUSOxsXbbXjv35Kb2roxQcT+SkkgbG0ZaYNT/sLxIcKFbvLxrNYiF9kKnVZRRXOdlzoyfkR1zqObkSmUZug+jfPIsu50WN1A2JFmOLcTh6oh7KYbn2YXnkCCBu1Jo0E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964245109431.5292720922653; Tue, 1 Oct 2019 14:10:45 -0700 (PDT) Received: from localhost ([::1]:48204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPPv-0000B2-FC for importer@patchew.org; Tue, 01 Oct 2019 17:10:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55507) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9U-0006St-1d for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9S-0000MX-Re for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35788) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9M-0000Jo-Tk; Tue, 01 Oct 2019 15:49:33 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD9A7C0546D5; Tue, 1 Oct 2019 19:49:31 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63E0A5C224; Tue, 1 Oct 2019 19:49:29 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 57/67] iotests/245: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:05 +0200 Message-Id: <20191001194715.2796-58-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 01 Oct 2019 19:49:31 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/245 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 72ab2a248d..af6bc40575 100644 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -24,7 +24,7 @@ import re import iotests import copy import json -from iotests import qemu_img, qemu_io +from iotests import create_test_image, remove_test_image, qemu_io =20 hd_path =3D [ os.path.join(iotests.test_dir, 'hd0.img'), @@ -43,9 +43,9 @@ class TestBlockdevReopen(iotests.QMPTestCase): total_io_cmds =3D 0 =20 def setUp(self): - qemu_img('create', '-f', iotests.imgfmt, hd_path[0], '3M') - qemu_img('create', '-f', iotests.imgfmt, '-b', hd_path[0], hd_path= [1]) - qemu_img('create', '-f', iotests.imgfmt, hd_path[2], '3M') + create_test_image(hd_path[0], '3M') + create_test_image(hd_path[1], backing_file=3Dhd_path[0]) + create_test_image(hd_path[2], '3M') qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xa0 0 1M', hd_path= [0]) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xa1 1M 1M', hd_path= [1]) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xa2 2M 1M', hd_path= [2]) @@ -55,9 +55,9 @@ class TestBlockdevReopen(iotests.QMPTestCase): def tearDown(self): self.vm.shutdown() self.check_qemu_io_errors() - os.remove(hd_path[0]) - os.remove(hd_path[1]) - os.remove(hd_path[2]) + remove_test_image(hd_path[0]) + remove_test_image(hd_path[1]) + remove_test_image(hd_path[2]) =20 # The output of qemu-io is not returned by vm.hmp_qemu_io() but # it's stored in the log and can only be read when the VM has been @@ -328,7 +328,8 @@ class TestBlockdevReopen(iotests.QMPTestCase): =20 # First we create a 2MB raw file, and fill each half with a # different value - qemu_img('create', '-f', 'raw', hd_path[0], '2M') + remove_test_image(hd_path[0]) + create_test_image(hd_path[0], '2M', fmt=3D'raw') qemu_io('-f', 'raw', '-c', 'write -P 0xa0 0 1M', hd_path[0]) qemu_io('-f', 'raw', '-c', 'write -P 0xa1 1M 1M', hd_path[0]) =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963802; cv=none; d=zoho.com; s=zohoarc; b=FBWqMS5un34gyLovs0a28zex+hISNWyLz46Tm1EACTYyejRymxWE2gEj1svur554EIIPDgu0M847/avm/YiL3a6Vg6jnr5zWk+fgkdik5wsqY6wt+EDEw63YyZz3GYOflet58Cg+YMWlgZFrNWbQtNI4nSxSyY1uhS98j+UY2e8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963802; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vSr4OS5W2vFs8tXKwc2AuPXzL5a1eK7BDQ6J74Qnyeo=; b=cJ6daJJ5VCLsV91IvCAl2JatsQgcN3BrO44pC+pmzlz707OveMRIz1ZIKz9X9X9MKToqJsF9d6uILjGOvIXEQvMpTLnPMrePMyE+UjcuBMKTnRP65CIbADnTKYqsu7v/lyMlcmCV2gcMEb1sRiPjtLqsmvx9gafUj0IULQAvsU0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963802550850.5094168151254; Tue, 1 Oct 2019 14:03:22 -0700 (PDT) Received: from localhost ([::1]:48130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPIf-0001pM-4M for importer@patchew.org; Tue, 01 Oct 2019 17:03:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55567) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9b-0006dC-QV for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9Z-0000Qd-T2 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60485) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9O-0000Kp-PW; Tue, 01 Oct 2019 15:49:35 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15759105786C; Tue, 1 Oct 2019 19:49:34 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A22C11001B05; Tue, 1 Oct 2019 19:49:33 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 58/67] iotests/246: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:06 +0200 Message-Id: <20191001194715.2796-59-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 01 Oct 2019 19:49:34 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/246 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246 index d1364d5901..2224c61545 100755 --- a/tests/qemu-iotests/246 +++ b/tests/qemu-iotests/246 @@ -20,7 +20,7 @@ # owner=3Djsnow@redhat.com =20 import iotests -from iotests import log +from iotests import log, create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2'], # compat=3D1.1 is needed for dirty bitmaps @@ -35,11 +35,11 @@ def query_bitmaps(vm): return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []= ) for device in res['return'] } } =20 -with iotests.FilePath('img') as img_path, \ +with iotests.ImagePath('img') as img_path, \ iotests.VM() as vm: =20 log('--- Preparing image & VM ---\n') - iotests.qemu_img_create('-f', iotests.imgfmt, img_path, str(size)) + create_test_image(img_path, size) vm.add_drive(img_path) =20 =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569966755; cv=none; d=zoho.com; s=zohoarc; b=Xulmqmcog1fzE6YhYRyYiCS/sgsBY6VDimeHdCE64eONEtn7lfcKMg0WhuBcIKb2MHlicsUL5lbS9l56zvjwdnffvCV5BatjphZJvaFi7BJqp2gG1Gmj+tbJQdziMh3CDO3MOBsq7+l4mx18YKe/Cl/CqdaCRAnuZiNCF0oPRbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569966755; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=o5pHvOwTkCXWu9YSScIYJ8n6326yc8+k71X5yzS87zY=; b=QWGzzTMnH17qplmi+ML4Ddy/B0nAc/N7sNd9uv00zBZFo7Joxzw242/YL6uEU8OpSSOBaYcoaldWQN1bFAGP+jzEZtzVHOWN2+lmPh8sCL9oOLyMLUN/oIFt+hR2ljNqrIcVSUHRTCsgI97puE2/kP/B0qM70gujjCcav2WwIak= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569966755849806.4304472020431; Tue, 1 Oct 2019 14:52:35 -0700 (PDT) Received: from localhost ([::1]:48594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFQ4N-0003sz-Pk for importer@patchew.org; Tue, 01 Oct 2019 17:52:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55568) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9b-0006dD-Qq for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9a-0000Qs-2d for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52362) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9T-0000Ll-GC; Tue, 01 Oct 2019 15:49:39 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 59546A44AF5; Tue, 1 Oct 2019 19:49:36 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E972F6012C; Tue, 1 Oct 2019 19:49:35 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 59/67] iotests/248: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:07 +0200 Message-Id: <20191001194715.2796-60-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Tue, 01 Oct 2019 19:49:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/248 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/248 b/tests/qemu-iotests/248 index 0adc4da802..90821eaeda 100755 --- a/tests/qemu-iotests/248 +++ b/tests/qemu-iotests/248 @@ -19,7 +19,7 @@ # =20 import iotests -from iotests import qemu_img_create, qemu_io, file_path, filter_qmp_testfi= les +from iotests import create_test_image, qemu_io, image_path, filter_qmp_tes= tfiles =20 iotests.script_initialize(supported_fmts=3D['qcow2'], # With an external data file, we would need @@ -27,12 +27,12 @@ iotests.script_initialize(supported_fmts=3D['qcow2'], # of @file unsupported_imgopts=3D['data_file']) =20 -source, target =3D file_path('source', 'target') +source, target =3D image_path('source', 'target') size =3D 5 * 1024 * 1024 limit =3D 2 * 1024 * 1024 =20 -qemu_img_create('-f', iotests.imgfmt, source, str(size)) -qemu_img_create('-f', iotests.imgfmt, target, str(size)) +create_test_image(source, size) +create_test_image(target, size) qemu_io('-c', 'write 0 {}'.format(size), source) =20 # raw format don't like empty files --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569966482; cv=none; d=zoho.com; s=zohoarc; b=PtvIbEwtku3ZgchajGsSFP/5Did6G8pN6JpcbZySaOoT+VaphuJ5SYcCEbRy2Mh/bc6D8UoiI9/Nzd4adaiTVEevBzVlkg8v8fE2W5bNpuU5OUiOx6B7HHjb0rAPLd85dha0f9+WqiQ1Any15ewerGYka54w7HCKom55SMCOJsA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569966482; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TYmiuN0CKmnpLlUGPEO8dQQosCHbRWq4tvBgf2UrQr8=; b=V2JXDwmuvpTeNl0/jXsPbuNTqpH45qAKzGC/RnoYpydCCw4uaHmvurGN103H9ag3LSnJtj7s7fjtazl7OMyXqH9QOnSQS8x1okc4KrmS+jJslFS77skckE7dMV6/BuSMdWlsDbqwo9UB2IJBbUBdO5UXY19VVBj6NzA8+LH5PME= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569966482669623.4494557045152; Tue, 1 Oct 2019 14:48:02 -0700 (PDT) Received: from localhost ([::1]:48540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPzs-0000R9-Rz for importer@patchew.org; Tue, 01 Oct 2019 17:47:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55566) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9b-0006dB-QJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9a-0000Qn-1u for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60314) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9T-0000MU-GT; Tue, 01 Oct 2019 15:49:39 -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 9E81318C4266; Tue, 1 Oct 2019 19:49:38 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 392B55D9CC; Tue, 1 Oct 2019 19:49:38 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 60/67] iotests/254: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:08 +0200 Message-Id: <20191001194715.2796-61-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 01 Oct 2019 19:49:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/254 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254 index 0404faf853..b44771fbc6 100755 --- a/tests/qemu-iotests/254 +++ b/tests/qemu-iotests/254 @@ -19,16 +19,16 @@ # =20 import iotests -from iotests import qemu_img_create, file_path, log +from iotests import create_test_image, image_path, log =20 iotests.script_initialize(supported_fmts=3D['qcow2'], # compat=3D1.1 is needed for dirty bitmaps unsupported_imgopts=3D['compat=3D0.10']) =20 -disk, top =3D file_path('disk', 'top') +disk, top =3D image_path('disk', 'top') size =3D 1024 * 1024 =20 -qemu_img_create('-f', iotests.imgfmt, disk, str(size)) +create_test_image(disk, size) =20 vm =3D iotests.VM().add_drive(disk, opts=3D'node-name=3Dbase') vm.launch() --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964166; cv=none; d=zoho.com; s=zohoarc; b=bZhO4eyV8kqLURbERlrvl4+m6vWGztKS8YJMp8f8a+iVtOwLZ1moo3Iu8cumqd2wKmF+jvs6MVplM9VRQpLc5RPOwD1Jz+N+G2Z8cal2kznaIltHXipiRN0zF5rYkANmtfnnaGQsgq4uYDxviBdGRR+Z5GnohQfR15OGLuU5e0M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964166; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=T/zLFjpYi+d1JywT9NAqmQEJPWGq0NClkc3/QfDTdN0=; b=Kc2zfFuv5jOlkStwmM2Je2SLmetPQfqZGBAOlFXbJuT4+2PsKKuisbW6e+xNDcqMRw6mjvlmuPpaFKJd4dbYi2qf1vcXu/Oc9i3pODPJgctWI9oyS+t2Wl2kdYVwFBuN2cRaUtJgRTCy4Vu018HctelHejztOXXZqnjoN15NZPk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964166491903.118798656653; Tue, 1 Oct 2019 14:09:26 -0700 (PDT) Received: from localhost ([::1]:48198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPOe-0007QX-L2 for importer@patchew.org; Tue, 01 Oct 2019 17:09:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55626) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9f-0006g0-Ce for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9d-0000Sa-Rh for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44136) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9V-0000Nl-Vx; Tue, 01 Oct 2019 15:49:43 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EAD03308FC4D; Tue, 1 Oct 2019 19:49:40 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 859BC5D6D0; Tue, 1 Oct 2019 19:49:40 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 61/67] iotests/255: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:09 +0200 Message-Id: <20191001194715.2796-62-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 01 Oct 2019 19:49:40 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/255 | 20 +++++++++----------- tests/qemu-iotests/255.out | 8 -------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/tests/qemu-iotests/255 b/tests/qemu-iotests/255 index ff16402268..4e745b68fa 100755 --- a/tests/qemu-iotests/255 +++ b/tests/qemu-iotests/255 @@ -21,7 +21,7 @@ # =20 import iotests -from iotests import imgfmt +from iotests import imgfmt, create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 @@ -39,8 +39,8 @@ iotests.log('Finishing a commit job with background reads= ') iotests.log('=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D') iotests.log('') =20 -with iotests.FilePath('t.qcow2') as disk_path, \ - iotests.FilePath('t.qcow2.mid') as mid_path, \ +with iotests.ImagePath('t.qcow2') as disk_path, \ + iotests.ImagePath('t.qcow2.mid') as mid_path, \ iotests.FilePath('t.qcow2.base') as base_path, \ iotests.VM() as vm: =20 @@ -48,11 +48,10 @@ with iotests.FilePath('t.qcow2') as disk_path, \ iotests.log("") =20 size =3D 128 * 1024 * 1024 - size_str =3D str(size) =20 iotests.create_image(base_path, size) - iotests.qemu_img_log('create', '-f', iotests.imgfmt, mid_path, size_st= r) - iotests.qemu_img_log('create', '-f', iotests.imgfmt, disk_path, size_s= tr) + assert create_test_image(mid_path, size) =3D=3D 0 + assert create_test_image(disk_path, size) =3D=3D 0 =20 # Create a backing chain like this: # base <- [throttled: bps-read=3D4096] <- mid <- overlay @@ -91,18 +90,17 @@ iotests.log('Closing the VM while a job is being cancel= led') iotests.log('=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= ') iotests.log('') =20 -with iotests.FilePath('src.qcow2') as src_path, \ - iotests.FilePath('dst.qcow2') as dst_path, \ +with iotests.ImagePath('src.qcow2') as src_path, \ + iotests.ImagePath('dst.qcow2') as dst_path, \ iotests.VM() as vm: =20 iotests.log('=3D=3D=3D Create images and start VM =3D=3D=3D') iotests.log('') =20 size =3D 128 * 1024 * 1024 - size_str =3D str(size) =20 - iotests.qemu_img_log('create', '-f', iotests.imgfmt, src_path, size_st= r) - iotests.qemu_img_log('create', '-f', iotests.imgfmt, dst_path, size_st= r) + assert create_test_image(src_path, size) =3D=3D 0 + assert create_test_image(dst_path, size) =3D=3D 0 =20 iotests.log(iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write 0 1M', src_path), diff --git a/tests/qemu-iotests/255.out b/tests/qemu-iotests/255.out index 348909fdef..2e837cbb5f 100644 --- a/tests/qemu-iotests/255.out +++ b/tests/qemu-iotests/255.out @@ -3,10 +3,6 @@ Finishing a commit job with background reads =20 =3D=3D=3D Create backing chain and start VM =3D=3D=3D =20 -Formatting 'TEST_DIR/PID-t.qcow2.mid', fmt=3Dqcow2 size=3D134217728 cluste= r_size=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 - -Formatting 'TEST_DIR/PID-t.qcow2', fmt=3Dqcow2 size=3D134217728 cluster_si= ze=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 - =3D=3D=3D Start background read requests =3D=3D=3D =20 =3D=3D=3D Run a commit job =3D=3D=3D @@ -23,10 +19,6 @@ Closing the VM while a job is being cancelled =20 =3D=3D=3D Create images and start VM =3D=3D=3D =20 -Formatting 'TEST_DIR/PID-src.qcow2', fmt=3Dqcow2 size=3D134217728 cluster_= size=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 - -Formatting 'TEST_DIR/PID-dst.qcow2', fmt=3Dqcow2 size=3D134217728 cluster_= size=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 - wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964442; cv=none; d=zoho.com; s=zohoarc; b=FHeeRBRXmtObwVek6zIg1wIGr2VVHRqw5lqOWuyKfZR6mfyu28H+I2oON8JS6bMdwFM9tNGkk29w9gpf/x7Q0astYz5qqcjpi5vbhzPZxCyBiqkcS+ET2gbPphPvvj4V8rKJ7Pq0MBUDkySRZUYLMsqS85zD+n81Rl3NG8e85Nw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964442; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=npCkFSVIoqLmH8Zi6eG4dMPNVALPIjd4bewelMpgMUo=; b=Daa0G+rMErgoepbLsX5RzwiO7P2252ZVegtlyVQ4wxPoX10VnVkAR8w+hoX7NFNVK0671Uc2qjoASnFK7FxiJzVBS8cSOmsX8pkV0q45VBTlyEYRDQy0Z6dI3PP7dA9NuUY5qJl98jBT/tVylQKBm6mL4PHGvEhbPxZOkzRllys= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964442260263.1570361100868; Tue, 1 Oct 2019 14:14:02 -0700 (PDT) Received: from localhost ([::1]:48234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPT6-0003Rr-Pa for importer@patchew.org; Tue, 01 Oct 2019 17:14:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55624) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9f-0006fr-6o for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9d-0000Se-Rj for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33540) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9Z-0000Pd-Ag; Tue, 01 Oct 2019 15:49:45 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EBED307D931; Tue, 1 Oct 2019 19:49:43 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC9A160C5D; Tue, 1 Oct 2019 19:49:42 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 62/67] iotests/256: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:10 +0200 Message-Id: <20191001194715.2796-63-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 01 Oct 2019 19:49:43 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/256 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256 index d2f9212e5a..7c78a123ad 100755 --- a/tests/qemu-iotests/256 +++ b/tests/qemu-iotests/256 @@ -21,13 +21,13 @@ =20 import os import iotests -from iotests import log +from iotests import log, create_test_image =20 iotests.script_initialize(supported_fmts=3D['qcow2']) size =3D 64 * 1024 * 1024 =20 -with iotests.FilePath('img0') as img0_path, \ - iotests.FilePath('img1') as img1_path, \ +with iotests.ImagePath('img0') as img0_path, \ + iotests.ImagePath('img1') as img1_path, \ iotests.FilePath('img0-full') as img0_full_path, \ iotests.FilePath('img1-full') as img1_full_path, \ iotests.FilePath('img0-incr') as img0_incr_path, \ @@ -62,8 +62,8 @@ with iotests.FilePath('img0') as img0_path, \ vm.add_object('iothread,id=3Diothread1') vm.add_device('virtio-scsi-pci,id=3Dscsi0,iothread=3Diothread0') vm.add_device('virtio-scsi-pci,id=3Dscsi1,iothread=3Diothread1') - iotests.qemu_img_create('-f', iotests.imgfmt, img0_path, str(size)) - iotests.qemu_img_create('-f', iotests.imgfmt, img1_path, str(size)) + create_test_image(img0_path, size) + create_test_image(img1_path, size) vm.add_drive(img0_path, interface=3D'none') vm.add_device('scsi-hd,id=3Ddevice0,drive=3Ddrive0,bus=3Dscsi0.0') vm.add_drive(img1_path, interface=3D'none') --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569963392; cv=none; d=zoho.com; s=zohoarc; b=JguHPQFECwIEB4OWPdTM/c1bBLDAMTpsdi78Gt87wF++hDGFLB63lDioenTVdQiDTrsKAlG7aoXQHP7mbEa2bVQp6NpS9TdVpUPGB1cSYqQN+qY+QcsOElb4BWIUuO2XjnmdBt7IujJY+Pzq9IQOlXqvJrw3sQVw9PKV21yOjHs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569963392; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=poQvrbuSOqio97UhESfffPO/1dzLz/+N9Xk1voY26Yw=; b=lV7m11H+0f+RMbxy6hbCMuxZ8MKMhnXByyJVSFEOPYAjVB1oiFnmDEA003gEWvREcaKsV4LQ/shW0Hvccpi53XQmPqqz9m2DO3iV+wZPyVXau8+o//9hzpdESirkudPcmWstZjYQPaq6kGJLocAsXvnH2zbS7Vid50SCoyJrUQE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569963392225118.56606685541851; Tue, 1 Oct 2019 13:56:32 -0700 (PDT) Received: from localhost ([::1]:48066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPCA-0003lh-9W for importer@patchew.org; Tue, 01 Oct 2019 16:56:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9g-0006hf-3y for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9f-0000TW-0p for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44152) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9a-0000QQ-8y; Tue, 01 Oct 2019 15:49:46 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89E6C308FC4D; Tue, 1 Oct 2019 19:49:45 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 240EC5D6D0; Tue, 1 Oct 2019 19:49:44 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 63/67] iotests/257: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:11 +0200 Message-Id: <20191001194715.2796-64-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 01 Oct 2019 19:49:45 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/257 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index 82c10e9b52..ea38945a71 100755 --- a/tests/qemu-iotests/257 +++ b/tests/qemu-iotests/257 @@ -23,7 +23,7 @@ import math import os =20 import iotests -from iotests import log, qemu_img +from iotests import log, create_test_image, qemu_img =20 SIZE =3D 64 * 1024 * 1024 GRANULARITY =3D 64 * 1024 @@ -152,7 +152,7 @@ class Drive: def img_create(self, fmt, size): self.fmt =3D fmt self.size =3D size - iotests.qemu_img_create('-f', self.fmt, self.path, str(self.size)) + create_test_image(self.path, self.size) =20 def create_target(self, name, fmt, size): basename =3D os.path.basename(self.path) @@ -273,10 +273,10 @@ def test_bitmap_sync(bsync_mode, msync_mode=3D'bitmap= ', failure=3DNone): an incomplete backup. Testing limitations prevent testing competing writes. """ - with iotests.FilePaths(['img', 'bsync1', 'bsync2', + with iotests.ImagePath('img') as img_path, \ + iotests.FilePaths(['bsync1', 'bsync2', 'fbackup0', 'fbackup1', 'fbackup2']) as \ - (img_path, bsync1, bsync2, - fbackup0, fbackup1, fbackup2), \ + (bsync1, bsync2, fbackup0, fbackup1, fbackup2)= , \ iotests.VM() as vm: =20 mode =3D "Mode {:s}; Bitmap Sync {:s}".format(msync_mode, bsync_mo= de) @@ -439,8 +439,8 @@ def test_backup_api(): """ Test malformed and prohibited invocations of the backup API. """ - with iotests.FilePaths(['img', 'bsync1']) as \ - (img_path, backup_path), \ + with iotests.ImagePath('img') as img_path, \ + iotests.FilePath('bsync1') as backup_path, \ iotests.VM() as vm: =20 log("\n=3D=3D=3D API failure tests =3D=3D=3D\n") --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569967068; cv=none; d=zoho.com; s=zohoarc; b=LiPwKSHdHRSTV+RQjaBUKq3TgO5oBKo2IYsQ/XolM5vlXQfjip5ZSIPJHxUnB1npzmVGmFfvJ1nfBKNzzt1b4Js+1ngx2++FaM74f2UdJl1146vzKlnUhprZ8woAiMZXg/zhU0+liE+t6sBlbwXN2tjM5VASpuB1NFgEqh3n6yM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569967068; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sMjFILybXthGFlxpmSAb8kBCXwWkdEVKTL9mDlYamqU=; b=cXw1XybbLuYe9plW3qkyENsrSDjpx6Ylhf9gRfkedfcTpBDY23zfUTqAYECv7JgngttZaQvLj65RlhvrzOg115Z1w+xcEQ42jtHBr5NRQdxEDwiCNuKgK6UnDIQ4BlDb0Ou3tBy5JBg8PyfHXBL8csnVupnlmk5XZcGYiAt7RSg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569967068340213.18619084410113; Tue, 1 Oct 2019 14:57:48 -0700 (PDT) Received: from localhost ([::1]:48642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFQ9S-0007qy-DJ for importer@patchew.org; Tue, 01 Oct 2019 17:57:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55672) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9h-0006j6-DT for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9g-0000UY-A7 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35854) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9d-0000S3-ML; Tue, 01 Oct 2019 15:49:49 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE8B8C0546F1; Tue, 1 Oct 2019 19:49:47 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69C9160623; Tue, 1 Oct 2019 19:49:47 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 64/67] iotests/258: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:12 +0200 Message-Id: <20191001194715.2796-65-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 01 Oct 2019 19:49:47 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/258 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/258 b/tests/qemu-iotests/258 index 1372522c7a..3e9505d8d4 100755 --- a/tests/qemu-iotests/258 +++ b/tests/qemu-iotests/258 @@ -20,7 +20,7 @@ # Creator/Owner: Max Reitz =20 import iotests -from iotests import log, qemu_img, qemu_io_silent, \ +from iotests import log, create_test_image, qemu_io_silent, \ filter_qmp_testfiles, filter_qmp_imgfmt =20 # Returns a node for blockdev-add @@ -65,22 +65,22 @@ def test_concurrent_finish(write_to_stream_node): # and the other way around, depending on whether the commit job # is finalized before stream completes or not. =20 - with iotests.FilePath('node4.img') as node4_path, \ - iotests.FilePath('node3.img') as node3_path, \ - iotests.FilePath('node2.img') as node2_path, \ - iotests.FilePath('node1.img') as node1_path, \ - iotests.FilePath('node0.img') as node0_path, \ + with iotests.ImagePath('node4.img') as node4_path, \ + iotests.ImagePath('node3.img') as node3_path, \ + iotests.ImagePath('node2.img') as node2_path, \ + iotests.ImagePath('node1.img') as node1_path, \ + iotests.ImagePath('node0.img') as node0_path, \ iotests.VM() as vm: =20 # It is important to use raw for the base layer (so that # permissions are just handed through to the protocol layer) - assert qemu_img('create', '-f', 'raw', node0_path, '64M') =3D=3D 0 + assert create_test_image(node0_path, '64M', fmt=3D'raw') =3D=3D 0 =20 stream_throttle=3DNone commit_throttle=3DNone =20 for path in [node1_path, node2_path, node3_path, node4_path]: - assert qemu_img('create', '-f', iotests.imgfmt, path, '64M') = =3D=3D 0 + assert create_test_image(path, '64M') =3D=3D 0 =20 if write_to_stream_node: # This is what (most of the time) makes commit finish --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964712; cv=none; d=zoho.com; s=zohoarc; b=gm/74mOR+0jdh7n5rnMt8TTQgLqy/p8cLfnImCKoUiLsppWjTm6hWMv0he+FtX73qqeRsLKP6VvJG9W3xGhVMpguruBz+3Y/ASJWoHSdgBVLRMCumabjlTXs0aMSPzf7UNib46oZdEYwa0YiGwQ/JkLfThf6VaAw/6I/enieKuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964712; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=LH2SakpQzpgbvT+qnIPqetuRMR9qurEwuB56Sz4M4BQ=; b=BTivSKxrGy/UcZH7/axtXcXgvPoyDeIpg/jSidosYL7SI7pbX+0OMCc7iy4AvHOFd4aIDbZ2ofutBor1ZjU7vod2+wwlq9z3Qx+bno/odramzAP4JviMG1+aflZOw0rlYdfTBnFBxbTS0wCZ2cNTDSjL0loX2g1p2bE+REeo/y4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569964712545865.5968738925154; Tue, 1 Oct 2019 14:18:32 -0700 (PDT) Received: from localhost ([::1]:48276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPXR-0006WO-4a for importer@patchew.org; Tue, 01 Oct 2019 17:18:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55686) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9i-0006k8-Be for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9h-0000V6-5i for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48482) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9e-0000T0-TA; Tue, 01 Oct 2019 15:49:51 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2839318CB8FE; Tue, 1 Oct 2019 19:49:50 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF6305D6D0; Tue, 1 Oct 2019 19:49:49 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 65/67] iotests/262: Honor $IMGOPTS Date: Tue, 1 Oct 2019 21:47:13 +0200 Message-Id: <20191001194715.2796-66-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Tue, 01 Oct 2019 19:49:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz --- tests/qemu-iotests/262 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/262 b/tests/qemu-iotests/262 index 6879665f99..b436fb3e14 100755 --- a/tests/qemu-iotests/262 +++ b/tests/qemu-iotests/262 @@ -21,11 +21,12 @@ # iothread just for fun. =20 import iotests +from iotests import create_test_image import os =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 -with iotests.FilePath('img') as img_path, \ +with iotests.ImagePath('img') as img_path, \ iotests.FilePath('mig_fifo') as fifo, \ iotests.VM(path_suffix=3D'a') as vm_a, \ iotests.VM(path_suffix=3D'b') as vm_b: @@ -49,7 +50,7 @@ with iotests.FilePath('img') as img_path, \ =20 vm.add_device('virtio-blk,drive=3D%s,iothread=3Diothread0' % root) =20 - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, img_path, '64M') + create_test_image(img_path, '64M') =20 os.mkfifo(fifo) =20 --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569967278; cv=none; d=zoho.com; s=zohoarc; b=j0wdLFnsoc+IRTVhay9SOzL3DgJS6dC0mQ6U9lznLjxvpIyWwiHtXoCzswCrg+QZ8dkYBniMI3P7f/SNt/UtveryQDPaMeeA6gzCWv5quvvfSoMKKCWUKfXHgu12oY8YRauNrUbo0rjhNX906KmO6uWMmStiPwAEsYGNPxotTuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569967278; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=d9cZztVegbk1zK/x13Rj0YJ9Img6lthYAUegD5H7eqI=; b=OkMGd45R5yrmisGFnrM5/oYq0099818aR8TeU5rFb74jW4vRegtm4BNFZtTXIcbB+9lwk+UuOSrw6weR2VKROg+PdeWV+1GX+k9nU6UoqVQUyTKatMGKXx130lxrDREXfAc9K7RRgmCZ+sb8Om2CJ3j2dn9FMhkS8c/HD3fxSG0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569967278692720.6330512685036; Tue, 1 Oct 2019 15:01:18 -0700 (PDT) Received: from localhost ([::1]:48714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFQCr-00025h-0o for importer@patchew.org; Tue, 01 Oct 2019 18:01:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55724) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9m-0006qX-ND for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9k-0000Wg-6B for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:49:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9h-0000Uj-6S; Tue, 01 Oct 2019 15:49:53 -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 6CBDE30842AF; Tue, 1 Oct 2019 19:49:52 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 065955D9C9; Tue, 1 Oct 2019 19:49:51 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 66/67] iotests.py: Forbid qemu_img*('create', ...) Date: Tue, 1 Oct 2019 21:47:14 +0200 Message-Id: <20191001194715.2796-67-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 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.40]); Tue, 01 Oct 2019 19:49:52 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" All tests should use create_test_image(). Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 36 +++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index f3c80ba4e9..2e377b8379 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -82,12 +82,20 @@ luks_default_secret_object =3D 'secret,id=3Dkeysec0,dat= a=3D' + \ luks_default_key_secret_opt =3D 'key-secret=3Dkeysec0' =20 =20 -def qemu_img(*args): +# @from_create_test_image is purely for use in create_test_image +def qemu_img(*args, from_create_test_image=3DFalse): '''Run qemu-img and return the exit code''' + args =3D list(args) + + assert args[0] !=3D 'create' or from_create_test_image, \ + 'Use iotests.create_test_image for image creation' + devnull =3D open('/dev/null', 'r+') - exitcode =3D subprocess.call(qemu_img_args + list(args), stdin=3Ddevnu= ll, stdout=3Ddevnull) + exitcode =3D subprocess.call(qemu_img_args + args, + stdin=3Ddevnull, stdout=3Ddevnull) if exitcode < 0: - sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode,= ' '.join(qemu_img_args + list(args)))) + sys.stderr.write('qemu-img received signal %i: %s\n' % + (-exitcode, ' '.join(qemu_img_args + args))) return exitcode =20 def ordered_qmp(qmsg, conv_keys=3DTrue): @@ -162,7 +170,7 @@ def create_test_image(filename, size=3DNone, fmt=3Dimgf= mt, opts=3D[], if size is not None: args.append(str(size)) =20 - return qemu_img(*args) + return qemu_img(*args, from_create_test_image=3DTrue) =20 # Use this to remove images create with create_test_image in the # default image format (iotests.imgfmt) @@ -180,20 +188,32 @@ def remove_test_image(filename): =20 def qemu_img_verbose(*args): '''Run qemu-img without suppressing its output and return the exit cod= e''' - exitcode =3D subprocess.call(qemu_img_args + list(args)) + args =3D list(args) + + assert args[0] !=3D 'create', \ + 'Use iotests.create_test_image for image creation' + + exitcode =3D subprocess.call(qemu_img_args + args) if exitcode < 0: - sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode,= ' '.join(qemu_img_args + list(args)))) + sys.stderr.write('qemu-img received signal %i: %s\n' % + (-exitcode, ' '.join(qemu_img_args + args))) return exitcode =20 def qemu_img_pipe(*args): '''Run qemu-img and return its output''' - subp =3D subprocess.Popen(qemu_img_args + list(args), + args =3D list(args) + + assert args[0] !=3D 'create', \ + 'Use iotests.create_test_image for image creation' + + subp =3D subprocess.Popen(qemu_img_args + args, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.STDOUT, universal_newlines=3DTrue) exitcode =3D subp.wait() if exitcode < 0: - sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode,= ' '.join(qemu_img_args + list(args)))) + sys.stderr.write('qemu-img received signal %i: %s\n' % + (-exitcode, ' '.join(qemu_img_args + args))) return subp.communicate()[0] =20 def qemu_img_log(*args): --=20 2.21.0 From nobody Fri May 3 19:24:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569964344; cv=none; d=zoho.com; s=zohoarc; b=S5vMWYSo83sukgg5uD0SuLcfIdQoCqYdcZuM+QlRHfR2X/CMWkA47LzysihBG6zKkdQZnkSsHwkwvo4R0IjeVD0wcFP+ew+pKHy4oSBWwJOgOIDD76pnB4gVnAl5EPgWCn56FSeNaNmfTxtcjuHZTKjUSL8nf/mrdiCEQYlXtV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569964344; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZKO+COc+yXkz9UUjmriZW5UKu5m6MJi7Rz3ssyJf7J8=; b=XCHPkhnX/WVdt0vpJ6l2KxSrd1wV/cOjdb2L9BjWT/hKfFD4zN4FMwNzW4CnK/N9MV2J4aoU1y6/onN2t2+4hNKXZqHkKKfvXKHSRn0weD8zt3jrgP5l6x8b7teCsv6HKSkYRAN9ghPUiF9Cod17tsnBc9X2MSOoG1UPnibP5tI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15699643447814.591271776016129; Tue, 1 Oct 2019 14:12:24 -0700 (PDT) Received: from localhost ([::1]:48226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFPRW-00029z-Lk for importer@patchew.org; Tue, 01 Oct 2019 17:12:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55734) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFO9o-0006ra-AR for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:50:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFO9m-0000Xj-LJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 15:50:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41888) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFO9j-0000W7-Fv; Tue, 01 Oct 2019 15:49:55 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B921630715F9; Tue, 1 Oct 2019 19:49:54 +0000 (UTC) Received: from localhost (unknown [10.40.205.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53D4819C6A; Tue, 1 Oct 2019 19:49:54 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 67/67] iotests.py: Drop qemu_img_log(), qemu_img_create() Date: Tue, 1 Oct 2019 21:47:15 +0200 Message-Id: <20191001194715.2796-68-mreitz@redhat.com> In-Reply-To: <20191001194715.2796-1-mreitz@redhat.com> References: <20191001194715.2796-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 01 Oct 2019 19:49:54 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" They are both unused now. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 2e377b8379..2476f3744a 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -111,25 +111,6 @@ def ordered_qmp(qmsg, conv_keys=3DTrue): return od return qmsg =20 -def qemu_img_create(*args): - args =3D list(args) - - # default luks support - if '-f' in args and args[args.index('-f') + 1] =3D=3D 'luks': - if '-o' in args: - i =3D args.index('-o') - if 'key-secret' not in args[i + 1]: - args[i + 1].append(luks_default_key_secret_opt) - args.insert(i + 2, '--object') - args.insert(i + 3, luks_default_secret_object) - else: - args =3D ['-o', luks_default_key_secret_opt, - '--object', luks_default_secret_object] + args - - args.insert(0, 'create') - - return qemu_img(*args) - def create_test_image(filename, size=3DNone, fmt=3Dimgfmt, opts=3D[], backing_file=3DNone, backing_fmt=3DNone, objects=3D[], unsafe=3DFalse): @@ -216,11 +197,6 @@ def qemu_img_pipe(*args): (-exitcode, ' '.join(qemu_img_args + args))) return subp.communicate()[0] =20 -def qemu_img_log(*args): - result =3D qemu_img_pipe(*args) - log(result, filters=3D[filter_testfiles]) - return result - def img_info_log(filename, filter_path=3DNone, imgopts=3DFalse, extra_args= =3D[], hide_fields=3D[]): args =3D [ 'info' ] --=20 2.21.0