From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610561094; cv=none; d=zohomail.com; s=zohoarc; b=TtYvtkaZ8A0hsigZWmttP7xQ4MmEqcTnzzRrJ82n0SZkhqe/f4pl6h2a4t1LJOdOdsBOcf5Y2X0V01GKZCxanX7Z51saSL7FvW3LmEVXqWtpvRX05Fclu1qHdHTtyigDKznx8IvhfPurSGq6FHghgHGkGFk73RK8jgYDMa7MHmg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610561094; h=Content-Type: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; bh=JF5NaNd9qbTnGxc5ZHwbkkpbYpE9YgCzet4pLF9ZTac=; b=SiPBWgbdTgvEaVT53n1Box+M0Ma5wQIl+sS9jLzdrWx0UL1+goEzS0PvmtrowTwdRjUswzEDnEWCWD+5voZGn05/6sBxkS2GcUSM7//d/0aHSXozTcgzwC4vWy1/6mI1rnu2Oxo0HgMTPyTnaxYVyU1lS4eZSSl/2ZhBKn290Hk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610561094706727.6630831536628; Wed, 13 Jan 2021 10:04:54 -0800 (PST) Received: from localhost ([::1]:57626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkVp-0006nH-AZ for importer@patchew.org; Wed, 13 Jan 2021 13:04:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPG-0001fh-HP for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPC-0000tZ-QT for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:06 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-399-52rQalgpMkCUVBcCLkEquA-1; Wed, 13 Jan 2021 12:57:58 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D6C021014E78; Wed, 13 Jan 2021 17:57:56 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6AD4E19C47; Wed, 13 Jan 2021 17:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JF5NaNd9qbTnGxc5ZHwbkkpbYpE9YgCzet4pLF9ZTac=; b=c/mEQhubgA0oGY5cJnb1WQ7semCGmhBllWENyHBUMiTRUutF80Iz68EOqxMgG+qiXM6+I8 HAVkuWwKfYRVg4UMFmPYDVm22C5KL2WH0fT2N+eAIQ5/vWVeXq1/LlbbLjaEXiqm+qYpo7 5b0rOaWkJ1KV00Y3/Va4zt3t9blog3I= X-MC-Unique: 52rQalgpMkCUVBcCLkEquA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 1/8] iotests/297: Allow checking all Python test files Date: Wed, 13 Jan 2021 18:57:45 +0100 Message-Id: <20210113175752.403022-2-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" I.e., all Python files in the qemu-iotests/ directory. Most files of course do not pass, so there is an extensive skip list for now. (The only files that do pass are 209, 254, 283, and iotests.py.) (Alternatively, we could have the opposite, i.e. an explicit list of files that we do want to check, but I think it is better to check files by default.) I decided to include the list of files checked in the reference output, so we do not accidentally lose coverage of anything. That means adding new Python tests will require a change to 297.out, but that should not be a problem. On the other hand, I decided to hide mypy's "Success" lines from the reference output, because they do not add anything useful. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/297 | 66 ++++++++++++++++++++++++++++++++++---- tests/qemu-iotests/297.out | 6 +++- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index 5c5420712b..b1a7d6d5e8 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -30,13 +30,67 @@ if ! type -p "mypy" > /dev/null; then _notrun "mypy not found" fi =20 -pylint-3 --score=3Dn iotests.py +# TODO: Empty this list! +skip_files=3D( + 030 040 041 044 045 055 056 057 065 093 096 118 124 129 132 136 139 14= 7 148 + 149 151 152 155 163 165 169 194 196 199 202 203 205 206 207 208 210 21= 1 212 + 213 216 218 219 222 224 228 234 235 236 237 238 240 242 245 246 248 25= 5 256 + 257 258 260 262 264 266 274 277 280 281 295 296 298 299 300 302 303 30= 4 307 + nbd-fault-injector.py qcow2.py qcow2_format.py qed.py +) =20 -MYPYPATH=3D../../python/ mypy --warn-unused-configs --disallow-subclassing= -any \ - --disallow-any-generics --disallow-incomplete-defs \ - --disallow-untyped-decorators --no-implicit-optional \ - --warn-redundant-casts --warn-unused-ignores \ - --no-implicit-reexport iotests.py +file_list=3D() +for file in *; do + # Check files with a .py extension or a Python shebang + # (Unless they are in the skip_files list) + if [ -f "$file" ] && ((echo "$file" | grep -q '\.py$') || + (head -n 1 "$file" | grep -q '^#!.*python')) + then + skip_file=3Dfalse + for skip in "${skip_files[@]}"; do + if [ "$skip" =3D "$file" ]; then + skip_file=3Dtrue + break + fi + done + + if ! $skip_file; then + file_list+=3D("$file") + fi + fi +done + +# Emit list of all files that are checked so we will not accidentally +# lose coverage +echo 'Files to be checked:' + +file_list_str=3D'' +for file in "${file_list[@]}"; do + echo " $file" +done | sort + +# We can pass all files to pylint at once... +pylint-3 --score=3Dn "${file_list[@]}" + +# ...but mypy needs to be called once per file. Otherwise, it will +# interpret all given files as belonging together (i.e., they may not +# both define the same classes, etc.; most notably, they must not both +# define the __main__ module). +for file in "${file_list[@]}"; do + mypy_output=3D$( + MYPYPATH=3D../../python/ mypy --warn-unused-configs \ + --disallow-subclassing-any \ + --disallow-any-generics --disallow-incomplete-defs \ + --disallow-untyped-decorators --no-implicit-optional \ + --warn-redundant-casts --warn-unused-ignores \ + --no-implicit-reexport "$file" \ + 2>&1 + ) + + if [ $? !=3D 0 ]; then + echo "$mypy_output" + fi +done =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/297.out b/tests/qemu-iotests/297.out index 6acc843649..c5ebbf6a17 100644 --- a/tests/qemu-iotests/297.out +++ b/tests/qemu-iotests/297.out @@ -1,3 +1,7 @@ QA output created by 297 -Success: no issues found in 1 source file +Files to be checked: + 209 + 254 + 283 + iotests.py *** done --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610560806; cv=none; d=zohomail.com; s=zohoarc; b=XShQdYxP0RoU+etXiqBjfmea3bK6LpeqymQJDNBGmG4oUWu1/kvd0jdklDBakzVx/YF6Fk55oHPqD/nauLnOgbgNlSMOVz/rYW7XJjBEu7lSadIGkoe4yka1Apw7kL6+WCC+Hd0anL8DxLUNiKbgPxMv0wupdLuvqZFi0sNBISQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610560806; h=Content-Type: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; bh=rwDLgbif8bpJ7F2UY/z831fx0M5z2L/TjfKn/9WlPTQ=; b=jzQyCZuIlx0vcUGHI+Ts9nG8CMq2UyGT7FNDA8qTH8tRODzgEEWMvP9PrxBRZfpl+sweUQbkxg5mzMgdFJ7oJ1JeUys+7tsYQ9vHSiEBFJxpvZgSUxqiBIym11FRdsiuLkh4sUaum/R1td2Q7EYf60iwlDBnYhS8EQVpa06wcCQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610560806601527.2061591418707; Wed, 13 Jan 2021 10:00:06 -0800 (PST) Received: from localhost ([::1]:50712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkRB-0003Zr-A0 for importer@patchew.org; Wed, 13 Jan 2021 13:00:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPG-0001eu-Cr for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPE-0000vA-Bk for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:06 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-75-DTGP0LwhNKi1UDXd93RdfA-1; Wed, 13 Jan 2021 12:58:00 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F18D8066E0; Wed, 13 Jan 2021 17:57:59 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC84660BF1; Wed, 13 Jan 2021 17:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rwDLgbif8bpJ7F2UY/z831fx0M5z2L/TjfKn/9WlPTQ=; b=IIPt8qRPJN2Z44Bzbx6AiM066CWGsjbepquyG0Gdi++em5LUYsUBPB0bDxt0ro5+pWyZAH V4gv3j+VI35tUPdct/lA2OewfBDt5eel9mfJvtnRhRQQ8CcNqBg/sr9y0UPOO9A15uMZ00 KbQxDql3Z2cdeZAMqhq6F1Vsb5zPX/0= X-MC-Unique: DTGP0LwhNKi1UDXd93RdfA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 2/8] iotests: Move try_remove to iotests.py Date: Wed, 13 Jan 2021 18:57:46 +0100 Message-Id: <20210113175752.403022-3-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/124 | 8 +------- tests/qemu-iotests/iotests.py | 11 +++++++---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 3705cbb6b3..e40eeb50b9 100755 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -22,6 +22,7 @@ =20 import os import iotests +from iotests import try_remove =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, diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index dcdcd0387f..15704ca466 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -515,12 +515,15 @@ class FilePath: return False =20 =20 +def try_remove(img): + try: + os.remove(img) + except OSError: + pass + def file_path_remover(): for path in reversed(file_path_remover.paths): - try: - os.remove(path) - except OSError: - pass + try_remove(path) =20 =20 def file_path(*names, base_dir=3Dtest_dir): --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610561097; cv=none; d=zohomail.com; s=zohoarc; b=lyFTaAouCZYjNnLW5dVFO2sVYRMWYaLYYnIl7mZf+4mBp/o7+c3PC7n7C9PFUTEqnLXZ8UyzbLjK1EymlWC6jL8Ox/WrOEolhylnQ8f2+uZzeWoOhHEAhtsh40Ko8NIu6iMDePM7o1KQNiJ3eAWRlpkzpA9ozBoeW2FmiP1hSZs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610561097; h=Content-Type: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; bh=LxANx+Rz2agcyu5X1D3Ejr1ptPnBeUWQBvphznPKVvk=; b=BWHwhPoVQ3vPoUNMY3oB+7/Sw4lHrg8pLH+DmRNbxH1n08vLov86hhjspw8TDLGAz35AyQ8tvKQQEpPjiGQuTrlEh4pAQYZjil5g2JghOSYyf0l3cP50YvsofOaUNAFjCiDe+YcWk3uKjckZqN95c6O4tcDxX4kxs6OQ9Ex3n2Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 161056109705049.60095613310864; Wed, 13 Jan 2021 10:04:57 -0800 (PST) Received: from localhost ([::1]:57702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkVq-0006p5-G4 for importer@patchew.org; Wed, 13 Jan 2021 13:04:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPH-0001j8-JP for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPF-0000wM-71 for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:07 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-hEdWS9etOj-w0wTPeN3qqQ-1; Wed, 13 Jan 2021 12:58:02 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id B4FD2612AB; Wed, 13 Jan 2021 17:58:01 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C8F15C3E5; Wed, 13 Jan 2021 17:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LxANx+Rz2agcyu5X1D3Ejr1ptPnBeUWQBvphznPKVvk=; b=ejlVgxaFADl2bzlVaiqyvU6F51Q9OdSW+lGt3LgKUGZ4xLP1rxgLP7/JKtI6eeOs+vpzun D0XvVqWz+e/AvlFSmjJIRmbWuNetjsRyRmZH+ORq8iY/yyaPp9PdpJSLt8pEGv84YX4tcK de1IbyNjANdKcpTDlx2HS9T0jxyn6j4= X-MC-Unique: hEdWS9etOj-w0wTPeN3qqQ-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 3/8] iotests/129: Remove test images in tearDown() Date: Wed, 13 Jan 2021 18:57:47 +0100 Message-Id: <20210113175752.403022-4-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/129 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 0e13244d85..2fc65ada6a 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -47,6 +47,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase): result =3D self.vm.qmp("block_set_io_throttle", conv_keys=3DFalse, **params) self.vm.shutdown() + for img in (self.test_img, self.target_img, self.base_img): + iotests.try_remove(img) =20 def do_test_stop(self, cmd, **args): """Test 'stop' while block job is running on a throttled drive. --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610560823; cv=none; d=zohomail.com; s=zohoarc; b=hlgTJrzOsdx6Ls9G6PyYYYQzjBsGOXq9PdMDJU4VpqgeznQI668r7L86hc4xiBYzjc0+ntHMacMnorDH1luNegmyP186EGottojks0F8aOrttugslae7BPZjtOXB8x8IMcXM+6XwjA7uc53D9WKMfPX3ESihCc3CQVmIorfZvWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610560823; h=Content-Type: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; bh=0sOKI0PkBbpsD1lkPyyE95je+xXaX1EDNteAdaV4lNM=; b=Fh6g0iQtK3TQzYDrp1EMZr2reFHEYOGxmUgWVY6p8uqGU3kmk0DA/P8BDJofBnHbBmAdIqMMJQsevB7a/6BE8tflacciMe4sRJNV1sL4VUobxIzc871DmHcaVB1vhZr9M8e3hyR0NjZbLEbfxrGmubVWePUTNrKsEynOrZzt/oc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610560823151756.7968843780485; Wed, 13 Jan 2021 10:00:23 -0800 (PST) Received: from localhost ([::1]:51744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkRS-00041h-0t for importer@patchew.org; Wed, 13 Jan 2021 13:00:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPJ-0001oQ-Hp for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPH-0000yQ-Te for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:09 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-446-SNEesIsgPNuYu_FxQrt9kw-1; Wed, 13 Jan 2021 12:58:05 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E326802B45; Wed, 13 Jan 2021 17:58:04 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9AEA60938; Wed, 13 Jan 2021 17:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0sOKI0PkBbpsD1lkPyyE95je+xXaX1EDNteAdaV4lNM=; b=Cu0BhaAWIU3paQdv+tsYwQ+rinMcZctParuOSF3jQBAm1MaZ7CFZUnu0CCoY+Ga65RnesK A2Bj6Tp3Jl1415R7dV8wAi4r5hFk5y1pXaZvt4P7KqRMBGmrZ16m1HzeUngzPtdUs5cmJj pIe9XS5dgJSe558naPA+2r0DKy4y/g4= X-MC-Unique: SNEesIsgPNuYu_FxQrt9kw-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 4/8] iotests/129: Do not check @busy Date: Wed, 13 Jan 2021 18:57:48 +0100 Message-Id: <20210113175752.403022-5-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=63.128.21.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" @busy is false when the job is paused, which happens all the time because that is how jobs yield (e.g. for mirror at least since commit 565ac01f8d3). Back when 129 was added (2015), perhaps there was no better way of checking whether the job was still actually running. Now we have the @status field (as of 58b295ba52c, i.e. 2018), which can give us exactly that information. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 2fc65ada6a..dd23bb2e5a 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -69,7 +69,7 @@ class TestStopWithBlockJob(iotests.QMPTestCase): result =3D self.vm.qmp("stop") self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp("query-block-jobs") - self.assert_qmp(result, 'return[0]/busy', True) + self.assert_qmp(result, 'return[0]/status', 'running') self.assert_qmp(result, 'return[0]/ready', False) =20 def test_drive_mirror(self): --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610561601; cv=none; d=zohomail.com; s=zohoarc; b=IedvR2FqnSPf61v17wLiy2ARi0sd6qCwUFUYyEfF0YEI0PQRPtVHOoEHl+ZqtQeuFbNUnTK08Vzf3MHntAGmpaFS+aqgZ9NEmrBet9QanTnmnUfpTXR7jagsVjgE0zf/GpI9KGLcvvU2d4PeNJ+Kc8ZvO3myUyTICoK3sz/aO6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610561601; h=Content-Type: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; bh=hVw7md4Lj6AOU0w+kotowNbYNWj6T7IA5qZebkNO3ko=; b=bUTH2SWlfmQ8u/9sWgblDPVXW8MF4TzIn2B4MHYeIADeArM1T3LEbuzqPQ2pJvPSZtNNdrXw+puijpV7uRiBKjy0yCS7LwDiZExunvLd8beXR9ltrL43FSGTJoTHWq84tYHW7YR5jlN72Tkr2/N9HITXZW3ADn7XJ8/BIq/Je5I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610561601388907.5172669824346; Wed, 13 Jan 2021 10:13:21 -0800 (PST) Received: from localhost ([::1]:45088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzke0-0005mu-2V for importer@patchew.org; Wed, 13 Jan 2021 13:13:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPP-0001yt-Ln for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPN-00010O-Cx for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:15 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-90-YevLG2L3M36xsYvazWwIOA-1; Wed, 13 Jan 2021 12:58:08 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D92AC802B40; Wed, 13 Jan 2021 17:58:06 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 722475B4BA; Wed, 13 Jan 2021 17:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hVw7md4Lj6AOU0w+kotowNbYNWj6T7IA5qZebkNO3ko=; b=QIJEuV2NsazkWbxCmPNjn5vnYsACio/6lVdXKMBrOgvkMoFKUaqC3STWqzsZ0j0qxv4rgs HjdJmFoaUeQThbES/xJzfua+s2oOwiAzvkkH0rB/G9tqvLfw4CktcJmqtxjRf7bIw/DW3C HMMyAPGMxGdmcjZl+a/Tj5/df7NE5L8= X-MC-Unique: YevLG2L3M36xsYvazWwIOA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 5/8] iotests/129: Use throttle node Date: Wed, 13 Jan 2021 18:57:49 +0100 Message-Id: <20210113175752.403022-6-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=63.128.21.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Throttling on the BB has not affected block jobs in a while, so it is possible that one of the jobs in 129 finishes before the VM is stopped. We can fix that by running the job from a throttle node. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index dd23bb2e5a..58536bc6ee 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -32,20 +32,18 @@ class TestStopWithBlockJob(iotests.QMPTestCase): iotests.qemu_img('create', '-f', iotests.imgfmt, self.test_img, "-b", self.base_img, '-F', iotests.imgfmt) 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 =3D iotests.VM() + self.vm.add_object('throttle-group,id=3Dtg0,x-bps-total=3D1024') + + source_drive =3D 'driver=3Dthrottle,' \ + 'throttle-group=3Dtg0,' \ + f'file.driver=3D{iotests.imgfmt},' \ + f'file.file.filename=3D{self.test_img}' + + self.vm.add_drive(None, source_drive) self.vm.launch() =20 def tearDown(self): - params =3D {"device": "drive0", - "bps": 0, - "bps_rd": 0, - "bps_wr": 0, - "iops": 0, - "iops_rd": 0, - "iops_wr": 0, - } - result =3D self.vm.qmp("block_set_io_throttle", conv_keys=3DFalse, - **params) self.vm.shutdown() for img in (self.test_img, self.target_img, self.base_img): iotests.try_remove(img) @@ -53,33 +51,24 @@ class TestStopWithBlockJob(iotests.QMPTestCase): def do_test_stop(self, cmd, **args): """Test 'stop' while block job is running on a throttled drive. The 'stop' command shouldn't drain the job""" - params =3D {"device": "drive0", - "bps": 1024, - "bps_rd": 0, - "bps_wr": 0, - "iops": 0, - "iops_rd": 0, - "iops_wr": 0, - } - result =3D self.vm.qmp("block_set_io_throttle", conv_keys=3DFalse, - **params) - self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp(cmd, **args) self.assert_qmp(result, 'return', {}) + result =3D self.vm.qmp("stop") self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp("query-block-jobs") + self.assert_qmp(result, 'return[0]/status', 'running') self.assert_qmp(result, 'return[0]/ready', False) =20 def test_drive_mirror(self): self.do_test_stop("drive-mirror", device=3D"drive0", - target=3Dself.target_img, + target=3Dself.target_img, format=3Diotests.imgfm= t, sync=3D"full") =20 def test_drive_backup(self): self.do_test_stop("drive-backup", device=3D"drive0", - target=3Dself.target_img, + target=3Dself.target_img, format=3Diotests.imgfm= t, sync=3D"full") =20 def test_block_commit(self): --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610561285; cv=none; d=zohomail.com; s=zohoarc; b=iUpdgpr6DJLVY66hStMtVFgTOA/0fpYY92VfSVFcpCi6Po7Qf2yb/L5VU3GwaINKdBTIAe2d8eov83dXOQyJAqyCNunTgAALRi6T00/+MsgYdpgMnETqCxWr4YhItdtPkZV+kSN+3ILrrbmpvqdVVtuHQ65HbcexOIchcPBp1zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610561285; h=Content-Type: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; bh=iVnHNMSZS/bcYc9NyCWat/9jmqgK0G82ubZDwoGFKUE=; b=YZm2hX0y2ak1mZ3x/FIxXuL9wXBhU/J3+Nx9bWbpmBRyMJUOyuIZKJYXygKrrfWi59kFT7qX3PTFZG1PxmQy97Ch0hCtP5gVmeApQFDq1sfRRf0RNasrTjU/oOjcAS+XdDlq7BM2R6O26WBkNKdiFhLaoJkvEuZTzchhTN29tfE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610561285057466.8290530136917; Wed, 13 Jan 2021 10:08:05 -0800 (PST) Received: from localhost ([::1]:36772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkYt-000206-Ri for importer@patchew.org; Wed, 13 Jan 2021 13:08:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPP-0001ys-Au for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPM-0000zp-Qa for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:15 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-9X7XAjlNOzmk724i0YeIPA-1; Wed, 13 Jan 2021 12:58:10 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74CF6802B46; Wed, 13 Jan 2021 17:58:09 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC98B5D9F4; Wed, 13 Jan 2021 17:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iVnHNMSZS/bcYc9NyCWat/9jmqgK0G82ubZDwoGFKUE=; b=E3Va5gV5LCIqLTY06o7llTJX8MHTwIF69Ezp3++BmgseTc7jFbrmn0Q2YRxAKWom8gNN1h sE6ArjYd+DVsEsdfGXgbrKon1VV8f2o6QrJteYJmEiOwuW1TFjq9+iw7kxQPH+ZgE3/454 2sCnfB58yxM5qY26Bn16Tw/6SSHKskE= X-MC-Unique: 9X7XAjlNOzmk724i0YeIPA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 6/8] iotests/129: Actually test a commit job Date: Wed, 13 Jan 2021 18:57:50 +0100 Message-Id: <20210113175752.403022-7-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=63.128.21.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Before this patch, test_block_commit() performs an active commit, which under the hood is a mirror job. If we want to test various different block jobs, we should perhaps run an actual commit job instead. Doing so requires adding an overlay above the source node before the commit is done (and then specifying the source node as the top node for the commit job). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 58536bc6ee..7b4b6649f0 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -26,6 +26,7 @@ class TestStopWithBlockJob(iotests.QMPTestCase): test_img =3D os.path.join(iotests.test_dir, 'test.img') target_img =3D os.path.join(iotests.test_dir, 'target.img') base_img =3D os.path.join(iotests.test_dir, 'base.img') + overlay_img =3D os.path.join(iotests.test_dir, 'overlay.img') =20 def setUp(self): iotests.qemu_img('create', '-f', iotests.imgfmt, self.base_img, "1= G") @@ -36,6 +37,7 @@ class TestStopWithBlockJob(iotests.QMPTestCase): self.vm.add_object('throttle-group,id=3Dtg0,x-bps-total=3D1024') =20 source_drive =3D 'driver=3Dthrottle,' \ + 'node-name=3Dsource,' \ 'throttle-group=3Dtg0,' \ f'file.driver=3D{iotests.imgfmt},' \ f'file.file.filename=3D{self.test_img}' @@ -45,7 +47,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - for img in (self.test_img, self.target_img, self.base_img): + for img in (self.test_img, self.target_img, self.base_img, + self.overlay_img): iotests.try_remove(img) =20 def do_test_stop(self, cmd, **args): @@ -72,7 +75,27 @@ class TestStopWithBlockJob(iotests.QMPTestCase): sync=3D"full") =20 def test_block_commit(self): - self.do_test_stop("block-commit", device=3D"drive0") + # Add overlay above the source node so that we actually use a + # commit job instead of a mirror job + + iotests.qemu_img('create', '-f', iotests.imgfmt, self.overlay_img, + '1G') + + result =3D self.vm.qmp('blockdev-add', **{ + 'node-name': 'overlay', + 'driver': iotests.imgfmt, + 'file': { + 'driver': 'file', + 'filename': self.overlay_img + } + }) + self.assert_qmp(result, 'return', {}) + + result =3D self.vm.qmp('blockdev-snapshot', + node=3D'source', overlay=3D'overlay') + self.assert_qmp(result, 'return', {}) + + self.do_test_stop('block-commit', device=3D'drive0', top_node=3D's= ource') =20 if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D["qcow2"], --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610561301; cv=none; d=zohomail.com; s=zohoarc; b=HQmLIpzCoCSgi3NcL+gZMQseEiZCaH0NCePkCsc1isTEb/aXQ9yDuAAox/LnAom36uqmcRBHenN42XlxG7qShFtl8LCNbbX/xlWngvoCUxp2O70jOqLpI8zCExwyvmjDzJg2M+gxYsLkoR2z3YTb9jmfE8j/h9wCp4V/oDlkgcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610561301; h=Content-Type: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; bh=bU+AGmGeqHFzTcyXBp/no/OR5o6fbi0ENmf3b/ZaRlQ=; b=i/xlW89/FocPffg91/NWSU51C3QB0K3N6YfihIPcHY292Qv/DBakSbFdqB3K+omgzGctzsGWQQ3qfsFdaC00urkMRhRSqoXeFH/nnvTuYXXALUtyL7d1RjSZux3bE4uzBsZNtF8xtTPuCDKcv0tBhnIbD/DhyxB4dpYFvbMACCU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610561301702790.932563855936; Wed, 13 Jan 2021 10:08:21 -0800 (PST) Received: from localhost ([::1]:37294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkZA-0002E4-Jx for importer@patchew.org; Wed, 13 Jan 2021 13:08:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPR-000206-Nh for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPP-00010w-Ga for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:17 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-65-TARGPk3bPqyXJ4EMnkkEOA-1; Wed, 13 Jan 2021 12:58:12 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D656018C89C4; Wed, 13 Jan 2021 17:58:11 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7216660C0F; Wed, 13 Jan 2021 17:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bU+AGmGeqHFzTcyXBp/no/OR5o6fbi0ENmf3b/ZaRlQ=; b=FAIR5fiMLInlLJNoezW8ksO+2P3/1LwNaU+zd/hKYhXJK89SaIGlZB+17fbvHV5ckuMx/G Hmvb+85ijomQsA//OqJy8UXfb3wNxv4y3LOKapxIeT24ERZpWe5YgFY8q/tOj5APAOG3Hz 9fC1FPtLSFUFXCRlzXNRCUdtkWt0Bq4= X-MC-Unique: TARGPk3bPqyXJ4EMnkkEOA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 7/8] iotests/129: Limit mirror job's buffer size Date: Wed, 13 Jan 2021 18:57:51 +0100 Message-Id: <20210113175752.403022-8-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Issuing 'stop' on the VM drains all nodes. If the mirror job has many large requests in flight, this may lead to significant I/O that looks a bit like 'stop' would make the job try to complete (which is what 129 should verify not to happen). We can limit the I/O in flight by limiting the buffer size, so mirror will make very little progress during the 'stop' drain. (We do not need to do anything about commit, which has a buffer size of 512 kB by default; or backup, which goes cluster by cluster. Once we have asynchronous requests for backup, that will change, but then we can fine-tune the backup job to only perform a single request on a very small chunk, too.) Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 7b4b6649f0..6d21470cd7 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -67,7 +67,7 @@ class TestStopWithBlockJob(iotests.QMPTestCase): def test_drive_mirror(self): self.do_test_stop("drive-mirror", device=3D"drive0", target=3Dself.target_img, format=3Diotests.imgfm= t, - sync=3D"full") + sync=3D"full", buf_size=3D65536) =20 def test_drive_backup(self): self.do_test_stop("drive-backup", device=3D"drive0", --=20 2.29.2 From nobody Sat Apr 20 00:41:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1610561158; cv=none; d=zohomail.com; s=zohoarc; b=l49Q0My48C0JQNHYEEwG276lT+e4DUUFyavXx6SV4U/Hla+rfoeLaRE0GZ7cYN/SeEFxNfCCmxyQ60PqEs6cMjExwifu2Q1e9kGst/CYX5OcDTQfU3jKGVYAcNasA/OWZYC7d8n0cs2l1sDfkvUGu/dI8xWEwS/iKXen1lSG88o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610561158; h=Content-Type: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; bh=zAr8NGcSB0K1UzQorV+b3CqRa/5TFojC7jgHvo+KKeY=; b=Bc869AooPXrzwW+M5a93iUjsFz30usDjFK1zXFCUOyVeMXpqD9wtvsNiQ4cxvHmOK/w+eXtmp5EASooRG+TtSDS4wAm9uI/BmCpzeOsBPme0WMOyl3ClUPg8QMBV2ijpO8zClI+x+QrfgG4ZR5IZAc+r9o0aevo81ni9Pg2PJ6c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1610561158428705.26863753959; Wed, 13 Jan 2021 10:05:58 -0800 (PST) Received: from localhost ([::1]:59904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzkWr-0007sk-83 for importer@patchew.org; Wed, 13 Jan 2021 13:05:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzkPU-00021d-3h for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzkPR-00012D-QO for qemu-devel@nongnu.org; Wed, 13 Jan 2021 12:58:19 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-02efRLyENhin50p0EmhsDA-1; Wed, 13 Jan 2021 12:58:15 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 762F41081B32; Wed, 13 Jan 2021 17:58:14 +0000 (UTC) Received: from localhost (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D2B75C3E0; Wed, 13 Jan 2021 17:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610560697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zAr8NGcSB0K1UzQorV+b3CqRa/5TFojC7jgHvo+KKeY=; b=UxBevN+ggYAMcOaoIfboKRT4CujOA5HEn3seRoBsWkPRJGARBG2+WnVP5hlVQh3uKsM/Hh H/KgKYi730af4aMyp+iB1CeURTdRG6C4XukCKtUrv4SchvpmP1Afu9ncM/ggs4DMTBdkJv 4tThi1kTmZi7yBYFkoML6an5j/9y4Ag= X-MC-Unique: 02efRLyENhin50p0EmhsDA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 8/8] iotests/129: Clean up pylint and mypy complaints Date: Wed, 13 Jan 2021 18:57:52 +0100 Message-Id: <20210113175752.403022-9-mreitz@redhat.com> In-Reply-To: <20210113175752.403022-1-mreitz@redhat.com> References: <20210113175752.403022-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 6 ++++-- tests/qemu-iotests/297 | 2 +- tests/qemu-iotests/297.out | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 6d21470cd7..64578493c1 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -20,9 +20,10 @@ =20 import os import iotests -import time =20 class TestStopWithBlockJob(iotests.QMPTestCase): + assert iotests.test_dir is not None + test_img =3D os.path.join(iotests.test_dir, 'test.img') target_img =3D os.path.join(iotests.test_dir, 'target.img') base_img =3D os.path.join(iotests.test_dir, 'base.img') @@ -32,7 +33,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase): 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, '-F', iotests.imgfmt) - iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x5d 1M 128M'= , self.test_img) + iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x5d 1M 128M', + self.test_img) self.vm =3D iotests.VM() self.vm.add_object('throttle-group,id=3Dtg0,x-bps-total=3D1024') =20 diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index b1a7d6d5e8..88f00415c8 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -32,7 +32,7 @@ fi =20 # TODO: Empty this list! skip_files=3D( - 030 040 041 044 045 055 056 057 065 093 096 118 124 129 132 136 139 14= 7 148 + 030 040 041 044 045 055 056 057 065 093 096 118 124 132 136 139 147 148 149 151 152 155 163 165 169 194 196 199 202 203 205 206 207 208 210 21= 1 212 213 216 218 219 222 224 228 234 235 236 237 238 240 242 245 246 248 25= 5 256 257 258 260 262 264 266 274 277 280 281 295 296 298 299 300 302 303 30= 4 307 diff --git a/tests/qemu-iotests/297.out b/tests/qemu-iotests/297.out index c5ebbf6a17..92cae940c5 100644 --- a/tests/qemu-iotests/297.out +++ b/tests/qemu-iotests/297.out @@ -1,5 +1,6 @@ QA output created by 297 Files to be checked: + 129 209 254 283 --=20 2.29.2