From nobody Sun May 5 15:47:15 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=1610967570; cv=none; d=zohomail.com; s=zohoarc; b=h0HuntzjmxLO1y/YeertLbifVPVGttXC2fS0K+Ul4Sh7IwBnw4yyQKatzd9+579ASqby9k2yzoWagINrLblUBbggE8O/7BLYmXKfvEVh1c5aE/9vzBZO78J4qwWoHEsmygWAZpAFen2sEMbA1Zv0f3+SvnlWsaf1Bl79oFNmcU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967570; 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=glzYiS9nCbaqdeVsmfNBCcoeml7p8cyuCJSpyJ+EZZQ=; b=YJx6T9KzuW87YJlkwuHiX3w6sczHWEW5JhU4anAwaW2n3I+c0lbuDE9E2KSHJpQF0GaoV2W2Yh3x95fGEyji0h8J4AfS+w9/vpFeXvY4XKbhAGirFUPAxqqBcQY5FvifxNKstgI5+rFbPlXA3UwhrJ7DZrNs2+oNrA2VBLn4qGg= 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 1610967570865789.5779949393118; Mon, 18 Jan 2021 02:59:30 -0800 (PST) Received: from localhost ([::1]:55444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SFt-0001FI-23 for importer@patchew.org; Mon, 18 Jan 2021 05:59:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SE4-0007uY-W1 for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:40301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SE1-00012u-JJ for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:36 -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-66-jQpt8uhQPEWCMZh68y7cdA-1; Mon, 18 Jan 2021 05:57:25 -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 A264B806660; Mon, 18 Jan 2021 10:57:24 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 448EE60BFA; Mon, 18 Jan 2021 10:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967452; 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=glzYiS9nCbaqdeVsmfNBCcoeml7p8cyuCJSpyJ+EZZQ=; b=dusu+mDstn+IbAPf2dpO/7USV1Ifzn2fxzRHnnitDsVBZFfpQWGa/SIIISdQdWtloiFHGs nrG+r+rHxZ6zLrx0HZHfiMSq6w5DBlBFp+m98RFLDq+c1EDvtHnULPsJbfa565l8dI3ZIQ xnCZhtfeeSQjWVrdmNJE1XAtJ9m0lwg= X-MC-Unique: jQpt8uhQPEWCMZh68y7cdA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 01/10] iotests.py: Assume a couple of variables as given Date: Mon, 18 Jan 2021 11:57:11 +0100 Message-Id: <20210118105720.14824-2-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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=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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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" There are a couple of environment variables that we fetch with os.environ.get() without supplying a default. Clearly they are required and expected to be set by the ./check script (as evidenced by execute_setup_common(), which checks for test_dir and qemu_default_machine to be set, and aborts if they are not). Using .get() this way has the disadvantage of returning an Optional[str] type, which mypy will complain about when tests just assume these values to be str. Use [] instead, which raises a KeyError for environment variables that are not set. When this exception is raised, catch it and move the abort code from execute_setup_common() there. Drop the 'assert iotests.sock_dir is not None' from iotest 300, because that sort of thing is precisely what this patch wants to prevent. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Willian Rampazzo Reviewed-by: John Snow --- tests/qemu-iotests/300 | 1 - tests/qemu-iotests/iotests.py | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/tests/qemu-iotests/300 b/tests/qemu-iotests/300 index 5b75121b84..b864a21d5e 100755 --- a/tests/qemu-iotests/300 +++ b/tests/qemu-iotests/300 @@ -27,7 +27,6 @@ import qemu =20 BlockBitmapMapping =3D List[Dict[str, Union[str, List[Dict[str, str]]]]] =20 -assert iotests.sock_dir is not None mig_sock =3D os.path.join(iotests.sock_dir, 'mig_sock') =20 =20 diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index dcdcd0387f..52facb8e04 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -75,12 +75,20 @@ qemu_opts =3D os.environ.get('QEMU_OPTIONS', '').strip(= ).split(' ') =20 imgfmt =3D os.environ.get('IMGFMT', 'raw') imgproto =3D os.environ.get('IMGPROTO', 'file') -test_dir =3D os.environ.get('TEST_DIR') -sock_dir =3D os.environ.get('SOCK_DIR') output_dir =3D os.environ.get('OUTPUT_DIR', '.') -cachemode =3D os.environ.get('CACHEMODE') -aiomode =3D os.environ.get('AIOMODE') -qemu_default_machine =3D os.environ.get('QEMU_DEFAULT_MACHINE') + +try: + test_dir =3D os.environ['TEST_DIR'] + sock_dir =3D os.environ['SOCK_DIR'] + cachemode =3D os.environ['CACHEMODE'] + aiomode =3D os.environ['AIOMODE'] + qemu_default_machine =3D os.environ['QEMU_DEFAULT_MACHINE'] +except KeyError: + # We are using these variables as proxies to indicate that we're + # not being run via "check". There may be other things set up by + # "check" that individual test cases rely on. + sys.stderr.write('Please run this test via the "check" script\n') + sys.exit(os.EX_USAGE) =20 socket_scm_helper =3D os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_help= er') =20 @@ -1294,14 +1302,6 @@ def execute_setup_common(supported_fmts: Sequence[st= r] =3D (), """ # Note: Python 3.6 and pylint do not like 'Collection' so use 'Sequenc= e'. =20 - # We are using TEST_DIR and QEMU_DEFAULT_MACHINE as proxies to - # indicate that we're not being run via "check". There may be - # other things set up by "check" that individual test cases rely - # on. - if test_dir is None or qemu_default_machine is None: - sys.stderr.write('Please run this test via the "check" script\n') - sys.exit(os.EX_USAGE) - debug =3D '-d' in sys.argv if debug: sys.argv.remove('-d') --=20 2.29.2 From nobody Sun May 5 15:47:15 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=1610967570; cv=none; d=zohomail.com; s=zohoarc; b=hfhTo6OlZWFTthkXKUiWJ1kbubI4KKKSlVqRLdd21XBt8eLNggdDXZYRah3tgZnkXebPnUvl0oQVKk2xAgMbqRiOMwLBR08WmfLRm0PHg9V289YXlpo/XgAo32+0uZLdStCZiS5j6c3rKq91TObOwZWs4FfQPql/PPbfRI1JdYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967570; 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=TuJIynWZq7LT7yGfgz4Ae+qoOAfRUpQtYE37NEjDz/U=; b=Y4yXuEMROp8wxKygsb6XtSD26rBeU8snbX8RSicN7h7iXqB+NNaJ8NYvzaL6q8UTnnxYWfxLDfBT85+hl/fLKKNDk0tMI0VShXImj5NSy5YYYVCgc5XHmrNW8jiyLze9aMqLZQ4OvejHMxeLSJJei6dPBMmSjsfBrNEj8OANxP8= 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 1610967570924260.6597387107679; Mon, 18 Jan 2021 02:59:30 -0800 (PST) Received: from localhost ([::1]:55378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SFt-0001Di-5t for importer@patchew.org; Mon, 18 Jan 2021 05:59:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SE3-0007u8-S9 for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SE1-00012W-5U for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:35 -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-29-Rie2ph6kM7qMyig4A_71jw-1; Mon, 18 Jan 2021 05:57:28 -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 0A3AF15722; Mon, 18 Jan 2021 10:57:27 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 72F835D9CD; Mon, 18 Jan 2021 10:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967451; 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=TuJIynWZq7LT7yGfgz4Ae+qoOAfRUpQtYE37NEjDz/U=; b=GNxDKwX0lIfXOOa5Cbg+9eiEvfM/IBhROxIiTmBRJcNJb6M2GkQ56TCtEXJSdlam1m+REp QZVL94sEGudPnsKKYvztjScvV8/UKpjUQNDmKgO8s4jBgTcEaBTE2KsgdlYq34QTumoMzk 2H17TCZwpxQCKG9RnwZgxR5XB7qoGww= X-MC-Unique: Rie2ph6kM7qMyig4A_71jw-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 02/10] iotests/297: Rewrite in Python and extend reach Date: Mon, 18 Jan 2021 11:57:12 +0100 Message-Id: <20210118105720.14824-3-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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=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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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" Instead of checking iotests.py only, check all Python files in the qemu-iotests/ directory. Of course, most of them 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.) Unless started in debug mode (./check -d), the output has no information on which files are tested, so we will not have a problem e.g. with backports, where some files may be missing when compared to upstream. Besides the technical rewrite, some more things are changed: - For the pylint invocation, PYTHONPATH is adjusted. This mirrors setting MYPYPATH for mypy. - Also, MYPYPATH is now derived from PYTHONPATH, so that we include paths set by the environment. Maybe at some point we want to let the check script add '../../python/' to PYTHONPATH so that iotests.py does not need to do that. - Passing --notes=3DFIXME,XXX to pylint suppresses warnings for TODO comments. TODO is fine, we do not need 297 to complain about such comments. - The "Success" line from mypy's output is suppressed, because (A) it does not add useful information, and (B) it would leak information about the files having been tested to the reference output, which we decidedly do not want. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/297 | 112 +++++++++++++++++++++++++++++-------- tests/qemu-iotests/297.out | 5 +- 2 files changed, 92 insertions(+), 25 deletions(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index 5c5420712b..e3db3e061e 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env python3 # # Copyright (C) 2020 Red Hat, Inc. # @@ -15,30 +15,98 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . =20 -seq=3D$(basename $0) -echo "QA output created by $seq" +import os +import re +import shutil +import subprocess +import sys =20 -status=3D1 # failure is the default! +import iotests =20 -# get standard environment -. ./common.rc =20 -if ! type -p "pylint-3" > /dev/null; then - _notrun "pylint-3 not found" -fi -if ! type -p "mypy" > /dev/null; then - _notrun "mypy not found" -fi +# TODO: Empty this list! +SKIP_FILES =3D ( + '030', '040', '041', '044', '045', '055', '056', '057', '065', '093', + '096', '118', '124', '129', '132', '136', '139', '147', '148', '149', + '151', '152', '155', '163', '165', '169', '194', '196', '199', '202', + '203', '205', '206', '207', '208', '210', '211', '212', '213', '216', + '218', '219', '222', '224', '228', '234', '235', '236', '237', '238', + '240', '242', '245', '246', '248', '255', '256', '257', '258', '260', + '262', '264', '266', '274', '277', '280', '281', '295', '296', '298', + '299', '300', '302', '303', '304', '307', + 'nbd-fault-injector.py', 'qcow2.py', 'qcow2_format.py', 'qed.py' +) =20 -pylint-3 --score=3Dn iotests.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 +def is_python_file(filename): + if not os.path.isfile(filename): + return False =20 -# success, all done -echo "*** done" -rm -f $seq.full -status=3D0 + if filename.endswith('.py'): + return True + + with open(filename) as f: + try: + first_line =3D f.readline() + return re.match('^#!.*python', first_line) is not None + except UnicodeDecodeError: # Ignore binary files + return False + + +def run_linters(): + files =3D [filename for filename in (set(os.listdir('.')) - set(SKIP_F= ILES)) + if is_python_file(filename)] + + iotests.logger.debug('Files to be checked:') + iotests.logger.debug(', '.join(sorted(files))) + + print('=3D=3D=3D pylint =3D=3D=3D') + sys.stdout.flush() + + # Todo notes are fine, but fixme's or xxx's should probably just be + # fixed (in tests, at least) + env =3D os.environ.copy() + qemu_module_path =3D os.path.join(os.path.dirname(__file__), + '..', '..', 'python') + try: + env['PYTHONPATH'] +=3D os.pathsep + qemu_module_path + except KeyError: + env['PYTHONPATH'] =3D qemu_module_path + subprocess.run(('pylint-3', '--score=3Dn', '--notes=3DFIXME,XXX', *fil= es), + env=3Denv, check=3DFalse) + + print('=3D=3D=3D mypy =3D=3D=3D') + sys.stdout.flush() + + # We have to call mypy separately for each 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). + env['MYPYPATH'] =3D env['PYTHONPATH'] + for filename in files: + p =3D subprocess.run(('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', + filename), + env=3Denv, + check=3DFalse, + stdout=3Dsubprocess.PIPE, + stderr=3Dsubprocess.STDOUT, + universal_newlines=3DTrue) + + if p.returncode !=3D 0: + print(p.stdout) + + +for linter in ('pylint-3', 'mypy'): + if shutil.which(linter) is None: + iotests.notrun(f'{linter} not found') + +iotests.script_main(run_linters) diff --git a/tests/qemu-iotests/297.out b/tests/qemu-iotests/297.out index 6acc843649..f2e1314d10 100644 --- a/tests/qemu-iotests/297.out +++ b/tests/qemu-iotests/297.out @@ -1,3 +1,2 @@ -QA output created by 297 -Success: no issues found in 1 source file -*** done +=3D=3D=3D pylint =3D=3D=3D +=3D=3D=3D mypy =3D=3D=3D --=20 2.29.2 From nobody Sun May 5 15:47:15 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=1610967708; cv=none; d=zohomail.com; s=zohoarc; b=XB73qf571lzy7Tbuq7iJNGRB7P17Ul7RKDM4TRAQqir4lDmznwyTHNDQjDmj2fmY/AtzqtSfJ6BqT/rTA4pPrZtUDh+FuKAAkIMTXXgGC5mcDdpA1hChkGBeF5PDEGZBrYA8a7blkyR/ek1DrIBSRYeHgw/wyixzz3fUeC18/5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967708; 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=HTj7WhH/l/DJ5q9eKSUIAL/TYTV8G43gOCc5SotuA+I=; b=CrCbcC1b0unUZKqLNvanRn3+JCFqFKYhYrLxipz5xqB6jMlKasMeM8Xu0+MhLjScF/QE/WG6M66xbLTWGDy9VxMtKqju3lR9yA57420wod2S9Sjs00o39Melbu1KI0Jjm+3sYOe4FmcJUwTGMl2z5z7nxzUta8vHbMoFAX08LGA= 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 1610967708526695.9025050900502; Mon, 18 Jan 2021 03:01:48 -0800 (PST) Received: from localhost ([::1]:35392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SI7-0004bw-7d for importer@patchew.org; Mon, 18 Jan 2021 06:01:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SE3-0007u6-S2 for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SE1-00012d-4Q for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:35 -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-71-e0Ae-cjUP1OZxAzgRM8E9g-1; Mon, 18 Jan 2021 05:57:30 -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 73C48107ACF5; Mon, 18 Jan 2021 10:57:29 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00A5D60622; Mon, 18 Jan 2021 10:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967452; 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=HTj7WhH/l/DJ5q9eKSUIAL/TYTV8G43gOCc5SotuA+I=; b=DfCUWeBIinJJv9Jpcx5XZbp6IvkfCk7sOFi5kfGDC09gVv9L4kPeXMoXwFANfao7Aovv1w FqRiqxA0iIQloX7HZCyI0EI0REWeLRi/MMGYpY0u8jShhTX1L0uJqcfhWeG52SokK9zxeZ 1DFkf3sBh8QDakj/Ng4nS8gFMJcvC8s= X-MC-Unique: e0Ae-cjUP1OZxAzgRM8E9g-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 03/10] iotests: Move try_remove to iotests.py Date: Mon, 18 Jan 2021 11:57:13 +0100 Message-Id: <20210118105720.14824-4-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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=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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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 Reviewed-by: Willian Rampazzo Reviewed-by: John Snow --- 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 52facb8e04..a69b4cdc4e 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -523,12 +523,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 Sun May 5 15:47:15 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=1610967577; cv=none; d=zohomail.com; s=zohoarc; b=FjIG+N/NDwJEvZJkwMDpN3R/HNN7q5/GsXviBjSaX6v4Mnp2PrZDTyTWNWVGUT5QFGT/iaDiaW9IrS7nSisKlUvqoXO6SE0hG3JtLsOYzbAj3WvWj7g7W1rt/eMsXv86nnVgg5A84mz7gX7l7dZcfC9xposncABJYbMRthwWyhE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967577; 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=ZF3tntK42JP7X0vMNoMurUIRKkPBP9BO0WMAJBjckhA=; b=Py7b4L7CPj+LuteFJNeDPW9JxkBDdDK3XajCK0Tt3ACn+TlF7OMZk8t9ZwZIo9EokU7NqJZJAxmwOK/ogyV8FAhJ08Ib0ezIly1j9TLq5sSApltlylkKFbw3gluSq+S0TbEskdr153eW7XCqwdQj7RG+KJ9Yow2qb0sLAtguS9U= 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 1610967577249285.36966239509684; Mon, 18 Jan 2021 02:59:37 -0800 (PST) Received: from localhost ([::1]:55992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SG0-0001Sf-6X for importer@patchew.org; Mon, 18 Jan 2021 05:59:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SE6-0007y9-St for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SE5-00015D-B0 for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:38 -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-438-3SeVHIG_MOeYlF8qQBmW9w-1; Mon, 18 Jan 2021 05:57:35 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 497A0107ACF8; Mon, 18 Jan 2021 10:57:34 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 127BD62688; Mon, 18 Jan 2021 10:57:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967456; 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=ZF3tntK42JP7X0vMNoMurUIRKkPBP9BO0WMAJBjckhA=; b=TQ8Yv+WpiLadymJwQDvoCxQlxfya/ckb2rFOZ7J4DcfoceYXw9KNGFlgZfVdsd20QrGzGB /GzY2bQnFhz1XB5A7BbIZXmgFYl5STK+vbzQcmvcadxutQKVBePZG7IarXW0O4o9/NfObL gFkhWYipZ7o/NZG45aDN8cjn9nb2FYQ= X-MC-Unique: 3SeVHIG_MOeYlF8qQBmW9w-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 04/10] iotests/129: Remove test images in tearDown() Date: Mon, 18 Jan 2021 11:57:14 +0100 Message-Id: <20210118105720.14824-5-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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 Reviewed-by: Willian Rampazzo --- 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 Sun May 5 15:47:15 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=1610967583; cv=none; d=zohomail.com; s=zohoarc; b=T1/WVJTEHqS6ytEUcELewH3O7uAQoS4xEBCU8tEudgyqaAI06zT4wbNHkrroCpmb7MC+ITSz8+c5xfelq6f1uI29QmWXncZ9gDOesYD9nL5+Nh8X5Y+ZFFLLbIQUMJuK6X7d/xBf9xkak04A57HjZHw2iQ6yXEcfV6MqDMMA6lE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967583; 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=e7j80F+imM+lzwgTuvFbbmuBLkPPeWFi/9jH3ns94jE=; b=CfuljNLFj6hu/NcsNmnQBdbTINXc66DDYjvk3vmn6Is2+u6MgoH7J/ZO587bw6UugMolQZwUrOjU20u3OYJ+5Lyr4GQMM+RB+D17juU48IPDIyAFcV/OPZSDOW4KgthQ1e3Wd3p3X5+xGsOeBhoAhXygzjCMpVoOhkV/daC8CYI= 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 1610967583389483.10066438790057; Mon, 18 Jan 2021 02:59:43 -0800 (PST) Received: from localhost ([::1]:56704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SG6-0001kF-9w for importer@patchew.org; Mon, 18 Jan 2021 05:59:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SEA-00089p-Ne for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:25368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SE8-00016p-74 for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:42 -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-560-X-Lt6i76NKCZwH94Ka2A2w-1; Mon, 18 Jan 2021 05:57:37 -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 86DB18030A1; Mon, 18 Jan 2021 10:57:36 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D7805D9D2; Mon, 18 Jan 2021 10:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967459; 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=e7j80F+imM+lzwgTuvFbbmuBLkPPeWFi/9jH3ns94jE=; b=apYqtxk6oljvKCQ4/0SnUDfZTytY8a9PkIBgRaahZf8/e7ZZon04Nyb2zSAJNwZIpoKPyY is+nPiu2a7zR5S9OecPNTw1RBsZS3XdXqn9M9gWiGx86/itYVPvPdPauVNQVwvDel0X4A6 apEhlxLOPwqlK6QKXIAJzCBy0Q+rKA4= X-MC-Unique: X-Lt6i76NKCZwH94Ka2A2w-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 05/10] iotests/129: Do not check @busy Date: Mon, 18 Jan 2021 11:57:15 +0100 Message-Id: <20210118105720.14824-6-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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 Reviewed-by: Willian Rampazzo --- 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 Sun May 5 15:47:15 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=1610967717; cv=none; d=zohomail.com; s=zohoarc; b=j/wZI4wdzMYMofG3WMAn/lT2055Mu2lsG+3QeNslxjoN2bgHg6tD2yuzUwwHNUDRKoI9u/OQBPkeQAX2VJnF3KjeXq1PaNVb9uMNcneH8YoZB/4V7Q+7jY+b7vLPBwU3yjK3uj6z6Y2VAPfFeGv8/3fFjmhlFXTAw2/N7XL0pt4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967717; 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=mwg9YtheUz9p+HTXZghiicKLpNBK4V5ThQhnaHPn3Ls=; b=eKyiZ5SKy4PK/TDPYDwo2mtPxyLlF95azCLbkwHvW6rHCeb2vueQ9ZI/b1JEblAnHLmsxpaKu6MEPjWMb1xgP4hcUkjHTnsUI4TJ2KkOuliSJZ9ni9y3emdSEwaX+59TjoTRE+iwk8qLcrwgNjF+j4e+bbXxMdCGAZ7HyazPQ8k= 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 1610967717951796.2266944464683; Mon, 18 Jan 2021 03:01:57 -0800 (PST) Received: from localhost ([::1]:36006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SIF-0004sD-O7 for importer@patchew.org; Mon, 18 Jan 2021 06:01:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SEC-0008Cr-0h for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:56462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SEA-00017r-8U for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:43 -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-578-AYFUAdHmOMGmX7all6fEgw-1; Mon, 18 Jan 2021 05:57:39 -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 A2D7B1005504; Mon, 18 Jan 2021 10:57:38 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4497553C9F; Mon, 18 Jan 2021 10:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967461; 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=mwg9YtheUz9p+HTXZghiicKLpNBK4V5ThQhnaHPn3Ls=; b=MUVmwJwC8p9Zta1K9YuURRU9JiNFRc5PxovMpU9WY98u81gmC/+koYLlVAhcgYzEk8myuJ jK9p6jtjnHW/IGt/FyKbzu7eeXpnJuduP0YNziGQlRn8uOKDGVsW5Pm5WjS3JRg/5qaGzK hc+Zs7ziWhNBCTrUa3+FLP6Mo0GrwAA= X-MC-Unique: AYFUAdHmOMGmX7all6fEgw-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 06/10] iotests/129: Use throttle node Date: Mon, 18 Jan 2021 11:57:16 +0100 Message-Id: <20210118105720.14824-7-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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 Reviewed-by: Willian Rampazzo --- 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..d40e2db24e 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 Sun May 5 15:47:15 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=1610967977; cv=none; d=zohomail.com; s=zohoarc; b=Agq5Jze8dC14m3ndAquOyg6y1ZG1ojr2TAoBy5sVwunFsXias1coPccsq3C/sI2GT5KaymeTf5kI24x/c+LeXkbE4riLAnBIWQ5mXUnPHA74d5LTsgBURFPMXnIeBwxXOSz8incxM4Sm44ISjfNBd0Kzcq1Yo+T3YRGU2D+z80I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967977; 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=/SVi4QwDAwcgbZha5HXJxZFLYGc11imSrFrDDXfiV8Q=; b=AS/z76bCZo3rwqQt2g3zNaErOgNd/n4GYZ1x+b3Y3lu5Wvm0hBLQzcLx8vsojOkO7ldkBDKVeOkPQMlPa/9qfEVzn/mGGn0v9m57ygbZL3nVSsvXWP8K45rgsoHqNP0YD1A3hCN7eo3leYgeZO2+bkaZsYiAM9n2tewuokfbK/4= 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 1610967977836843.6762721060704; Mon, 18 Jan 2021 03:06:17 -0800 (PST) Received: from localhost ([::1]:47468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SMS-00017P-Sy for importer@patchew.org; Mon, 18 Jan 2021 06:06:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SEH-0008PX-PF for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SEE-00019q-EP for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:49 -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-214-fFht4ZfeNUqQgQHsaxecaw-1; Mon, 18 Jan 2021 05:57:41 -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 D4CEB1005513; Mon, 18 Jan 2021 10:57:40 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E15C19D80; Mon, 18 Jan 2021 10:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967465; 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=/SVi4QwDAwcgbZha5HXJxZFLYGc11imSrFrDDXfiV8Q=; b=Ew7/tGMO2HZRznIH9H3vCMyF7tfSQczdJqogB//L92UF1T/0OR0da9lpU+sM/P9WpqvkRL VD0raccx2ZSfW5Ln0YBp2AB3kqhOu6Ry45vKw8YqqBBJhXjnx4I0N+G7hip3Kr2sVOU36l 8T0LiwhQ/h02e/5IHCrj0ZlRjD6eMHg= X-MC-Unique: fFht4ZfeNUqQgQHsaxecaw-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 07/10] iotests/129: Actually test a commit job Date: Mon, 18 Jan 2021 11:57:17 +0100 Message-Id: <20210118105720.14824-8-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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=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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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 Reviewed-by: Willian Rampazzo --- 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 d40e2db24e..104be6dded 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 Sun May 5 15:47:15 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=1610967828; cv=none; d=zohomail.com; s=zohoarc; b=ccq2SIcIekrD5qvt3v90P5bLa6jHk0tomY9ycEDEllNWs0xXRfWtlgAYaZBuq6O80Jq7wx13o35XiFDI/xscexCgBnBVgs8Wo/FnJ/hfj8u7LBQIyOjZGanoUin58KQALjlVZ91mg4NKqr0RmPLy+H/8i6UeRPS7tgzwB6DdPrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967828; 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=NFxf7K8kLVxAMlKNbwpPKafMOOZSkYJ+OBIiS33ee8U=; b=Kf5KR/ZslxeJDRLaxY/l07V/kD1qL0PpFS+rXirCAeGrw7TTYy0O5jqqrEY92z+pE5QAKEofpkN61/9FconZi8KpwEIGSQ1+U30wA+UYBCTd9oFk/hDRm35l9plNyoW/D03g8IHCyfVxSFHAds79OQHG2p3V6EC+MTBzjZXsyBA= 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 1610967828651427.69633344177987; Mon, 18 Jan 2021 03:03:48 -0800 (PST) Received: from localhost ([::1]:41912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SK3-0007Fl-If for importer@patchew.org; Mon, 18 Jan 2021 06:03:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SEG-0008OR-8g for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SEE-00019x-GD for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:48 -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-506-DdrrOJjVNByWsaLpj69jmA-1; Mon, 18 Jan 2021 05:57:44 -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 288FC8030A0; Mon, 18 Jan 2021 10:57:43 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B5E6B19717; Mon, 18 Jan 2021 10:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967465; 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=NFxf7K8kLVxAMlKNbwpPKafMOOZSkYJ+OBIiS33ee8U=; b=L4hsFMtxNEAUYrOH6n/AvlcNPEEzl8k/Ohk/GJIwaAeodKPvlQ5+LJe6mA1BxaAWj3HFKV QmV6iXh2N8Ncc3ntQV2D55BZgCjor9+lurnYlXbZPYMNvGD/zhLU0ezxC+tPeOuSbanacG HDIjoriNXGECWHYuGAnjlw76a1AeQ14= X-MC-Unique: DdrrOJjVNByWsaLpj69jmA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 08/10] iotests/129: Limit mirror job's buffer size Date: Mon, 18 Jan 2021 11:57:18 +0100 Message-Id: <20210118105720.14824-9-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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=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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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 Reviewed-by: Willian Rampazzo --- 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 104be6dded..80a5db521b 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 Sun May 5 15:47:15 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=1610967832; cv=none; d=zohomail.com; s=zohoarc; b=gm6whVcoiPpMSnaR5VE2oTw5n96tEKnAPnQccAuFHNclRHhrU7qrcS0B26QxekhsKfuSkMiwuSrnXTY9iR6NHHzZ4zWI7ys75XXTGTZkgYZ/QyC4uWnhfJwBFB8d91CLpZkK/lgy1lJaQknOeMfyTHvALOkFnbycLfOTnQWmLzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610967832; 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=XsQ5+JpJP2tq6KxZ729vQg5BjWfga7AF+r5C5NDYvDw=; b=oIOnyurgkF+7H/6c1/KEjrHUjdTR0mwHq41ecGM64p66UaIaD2HlYD4gKhB6ydQeTA4wq4SgLEttPMgs6Gd820BHtWIeAKJThQeKOAFrOer7vtnhYdMQnACIwGmfiOBcNUhQO1EZ2l6YxjwddDKgtYkQQGURec8xFxwaZNmkuhc= 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 1610967832372134.79851169949325; Mon, 18 Jan 2021 03:03:52 -0800 (PST) Received: from localhost ([::1]:42070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SK7-0007Ja-Cp for importer@patchew.org; Mon, 18 Jan 2021 06:03:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SEO-00007T-Cy for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SEK-0001Ce-BW for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:56 -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-365-zi0uI2UIPAuC1ZCmbV_log-1; Mon, 18 Jan 2021 05:57:46 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 461E880666B; Mon, 18 Jan 2021 10:57:45 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D9CCB100AE2F; Mon, 18 Jan 2021 10:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967471; 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=XsQ5+JpJP2tq6KxZ729vQg5BjWfga7AF+r5C5NDYvDw=; b=K9FbMcOZsaH5mZLInO7r5NxMVmCSkGmCxwMcyVk/DBQhKX/nWxRfy7dGgc1HDY2/c6jdFO M3gitO31p3Ey/DIfsuzzbYAEgVYFyaU7VZLeazHeXGkxeGOkmTTHLU6Z749Xt8mISgtPNw oFfiHmhqx7TwQChXKahVNqQn8Z7o0uY= X-MC-Unique: zi0uI2UIPAuC1ZCmbV_log-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 09/10] iotests/129: Clean up pylint and mypy complaints Date: Mon, 18 Jan 2021 11:57:19 +0100 Message-Id: <20210118105720.14824-10-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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" And consequentially drop it from 297's skip list. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 4 ++-- tests/qemu-iotests/297 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 80a5db521b..9a56217bf8 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -20,7 +20,6 @@ =20 import os import iotests -import time =20 class TestStopWithBlockJob(iotests.QMPTestCase): test_img =3D os.path.join(iotests.test_dir, 'test.img') @@ -32,7 +31,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 e3db3e061e..234e1da2fb 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -27,7 +27,7 @@ import iotests # TODO: Empty this list! SKIP_FILES =3D ( '030', '040', '041', '044', '045', '055', '056', '057', '065', '093', - '096', '118', '124', '129', '132', '136', '139', '147', '148', '149', + '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', '211', '212', '213', '216', '218', '219', '222', '224', '228', '234', '235', '236', '237', '238', --=20 2.29.2 From nobody Sun May 5 15:47:15 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=1610968081; cv=none; d=zohomail.com; s=zohoarc; b=QMbr07dxShdpwMNSNKV9w43pTVhNYGUvyaxK0W42+ouTfDp5dkodXT1hMZeZMWcWBOggaue1NLTX+ZIr1WsvjF1ZP5B31ykFxMm3m4vtsiZDCCZHHySQwABfJdS7zpFBQK4wgZew04FxgD8swrgEErjhPUi2ZIGwQmEoTcwJK/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610968081; 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=k8E5OzmfpPhPTHqY35rlCclfuYnizBJAAP9m3Rw1KMk=; b=MBnhQDbrymZPIGZGFhWjV7eXmoeTwMC47IwQ+Uiaus3QH3e3vYQ814O9wSuaRaoyXyJwQKk0jsie4b4XMbJ6xkDdPEoyncKIexVCrJZeiOspSSCZjzrKWaDkxUI2AQj4Go6vcwGyWOTEqmyNW3jr4OAvT7towi2fCxR8EgSDaAI= 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 1610968081489698.4618014522476; Mon, 18 Jan 2021 03:08:01 -0800 (PST) Received: from localhost ([::1]:50394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1SO8-0002Mr-6O for importer@patchew.org; Mon, 18 Jan 2021 06:08:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1SEP-00007g-IB for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:20001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1SEL-0001Cr-0v for qemu-devel@nongnu.org; Mon, 18 Jan 2021 05:57:57 -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-532-J38Fo12DMvmkTgtI2GVwWg-1; Mon, 18 Jan 2021 05:57:48 -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 6C152180E461; Mon, 18 Jan 2021 10:57:47 +0000 (UTC) Received: from localhost (ovpn-114-253.ams2.redhat.com [10.36.114.253]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0256A19725; Mon, 18 Jan 2021 10:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610967472; 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=k8E5OzmfpPhPTHqY35rlCclfuYnizBJAAP9m3Rw1KMk=; b=Arnpd77At4nX0/jSrVQZfrdkglnVUThFOO0hRkridecOvPLLZVHGr/OATOlzS+eDQI+5WC u02wedJ781o7fN8vYYIZpUxIQG5FQizSUFFUjcqOMxdCyCv0A7Wr+BPwONE/vNtTifHMVc fYpDgspiSfwUnDaQMGlmza+YYdgEBK4= X-MC-Unique: J38Fo12DMvmkTgtI2GVwWg-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v5 10/10] iotests/300: Clean up pylint and mypy complaints Date: Mon, 18 Jan 2021 11:57:20 +0100 Message-Id: <20210118105720.14824-11-mreitz@redhat.com> In-Reply-To: <20210118105720.14824-1-mreitz@redhat.com> References: <20210118105720.14824-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=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.189, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Willian Rampazzo 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" And consequentially drop it from 297's skip list. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Willian Rampazzo --- tests/qemu-iotests/297 | 2 +- tests/qemu-iotests/300 | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index 234e1da2fb..eab3d660bb 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -33,7 +33,7 @@ SKIP_FILES =3D ( '218', '219', '222', '224', '228', '234', '235', '236', '237', '238', '240', '242', '245', '246', '248', '255', '256', '257', '258', '260', '262', '264', '266', '274', '277', '280', '281', '295', '296', '298', - '299', '300', '302', '303', '304', '307', + '299', '302', '303', '304', '307', 'nbd-fault-injector.py', 'qcow2.py', 'qcow2_format.py', 'qed.py' ) =20 diff --git a/tests/qemu-iotests/300 b/tests/qemu-iotests/300 index b864a21d5e..4115f90578 100755 --- a/tests/qemu-iotests/300 +++ b/tests/qemu-iotests/300 @@ -22,7 +22,11 @@ import os import random import re from typing import Dict, List, Optional, Union + import iotests + +# Import qemu after iotests.py has amended sys.path +# pylint: disable=3Dwrong-import-order import qemu =20 BlockBitmapMapping =3D List[Dict[str, Union[str, List[Dict[str, str]]]]] @@ -110,10 +114,14 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): If @msg is None, check that there has not been any error. """ self.vm_b.shutdown() + + log =3D self.vm_b.get_log() + assert log is not None # Loaded after shutdown + if msg is None: - self.assertNotIn('qemu-system-', self.vm_b.get_log()) + self.assertNotIn('qemu-system-', log) else: - self.assertIn(msg, self.vm_b.get_log()) + self.assertIn(msg, log) =20 @staticmethod def mapping(node_name: str, node_alias: str, @@ -445,9 +453,13 @@ class TestBlockBitmapMappingErrors(TestDirtyBitmapMigr= ation): =20 # Check for the error in the source's log self.vm_a.shutdown() + + log =3D self.vm_a.get_log() + assert log is not None # Loaded after shutdown + self.assertIn(f"Cannot migrate bitmap '{name}' on node " f"'{self.src_node_name}': Name is longer than 255 by= tes", - self.vm_a.get_log()) + log) =20 # Expect abnormal shutdown of the destination VM because of # the failed migration --=20 2.29.2