From nobody Fri May 17 19:00:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612206858; cv=none; d=zohomail.com; s=zohoarc; b=KdXuhNnOi7oPZNHB3oeCLSujloEckrFTp3xAeFX80jW60qTbo7C3LnPDFqZJkz0llJ9GcdHLMqgAr3TuwKacUG9hsjE/OymXBKDL+HJn2TfM00HvzLlZmYiYsw9ycwTZyQfjY+wxJZRclQ6YrFu5tReIWO0pY7Xz0BO2TL0MiMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612206858; 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=o6HA8KRX94IUV2KQn8TjkiJmaisKGKRWWej3xJ7KVkI=; b=E1v9WVOTEKG0m0/rFZPBcSXmmxORA5+/enjhJj4aV6l2QZuMsHY61C09KRoJdqBmhYxdsRfhDDFweW0FylUkbxEPq2Av2b6dhxUR7sOa7KjAot0QexpHFMgaZf33PQa2ilpakXtS+TcSrZn7IimMWpes87OEmvgpwuDNZyE0Bxk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1612206858218296.1224942879127; Mon, 1 Feb 2021 11:14:18 -0800 (PST) Received: from localhost ([::1]:58642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6eeP-0000mS-4p for importer@patchew.org; Mon, 01 Feb 2021 14:14:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eXy-0003jr-Sk for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6eXw-0000Ns-TH for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07: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-568-uyTksuMWNXWxKyqtOZMwlQ-1; Mon, 01 Feb 2021 14:07:31 -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 AE79118C89CF; Mon, 1 Feb 2021 19:07:30 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id B401160C66; Mon, 1 Feb 2021 19:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612206455; 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=o6HA8KRX94IUV2KQn8TjkiJmaisKGKRWWej3xJ7KVkI=; b=UpSmpohN7InYtceH1YrZyoE/+6k4IEJegkRF7VYXmz8sVzqJUjLzPOzvbzn8YBTZR1yX8m FcToIJVy2O9grX8MDGsQSEx12zW6Q2R2Hk3cXLeBPwTusjgp3FdhJFTzg41HyEyPHSVWEL UqO10WlD9PHiRxGaNBvd3K3wq6Tep2U= X-MC-Unique: uyTksuMWNXWxKyqtOZMwlQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 1/6] MAINTAINERS: Add Vladimir as co-maintainer for Block Jobs Date: Mon, 1 Feb 2021 20:07:15 +0100 Message-Id: <20210201190720.245732-2-kwolf@redhat.com> In-Reply-To: <20210201190720.245732-1-kwolf@redhat.com> References: <20210201190720.245732-1-kwolf@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=kwolf@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=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy I'm developing Qemu backup for several years, and finally new backup architecture, including block-copy generic engine and backup-top filter landed upstream, great thanks to reviewers and especially to Max Reitz! I also have plans of moving other block-jobs onto block-copy, so that we finally have one generic block copying path, fast and well-formed. So, now I suggest to bring all parts of backup architecture into "Block Jobs" subsystem (actually, aio_task is shared with qcow2 and qemu-co-shared-resource can be reused somewhere else, but I'd keep an eye on them in context of block-jobs) and add myself as co-maintainer. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210128144144.27617-1-vsementsov@virtuozzo.com> Reviewed-by: Markus Armbruster Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bcd88668bc..00626941f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2210,6 +2210,7 @@ F: scsi/* =20 Block Jobs M: John Snow +M: Vladimir Sementsov-Ogievskiy L: qemu-block@nongnu.org S: Supported F: blockjob.c @@ -2222,7 +2223,16 @@ F: block/commit.c F: block/stream.c F: block/mirror.c F: qapi/job.json +F: block/block-copy.c +F: include/block/block-copy.c +F: block/backup-top.h +F: block/backup-top.c +F: include/block/aio_task.h +F: block/aio_task.c +F: util/qemu-co-shared-resource.c +F: include/qemu/co-shared-resource.h T: git https://gitlab.com/jsnow/qemu.git jobs +T: git https://src.openvz.org/scm/~vsementsov/qemu.git jobs =20 Block QAPI, monitor, command line M: Markus Armbruster --=20 2.29.2 From nobody Fri May 17 19:00:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612206579; cv=none; d=zohomail.com; s=zohoarc; b=WNEROPerOhbnNZyvkPPOGq5kxDxRc5DO05ovCNvB3Tvq6yEJXjavYuJsXzBtf089vmp5Xi19hvEtB4O53xSxjknPgYf5m9MczAwJ4TaAQLQ9jlKKuL8x4v21gjmAGXqd3tVoNHAHZ7XALblPhRs8+ReXEPYhD4BMyJTDBj+bWdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612206579; 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=/UPzXrJ27AqJD479c69kO56oBloOrR2rW0hBBE0pdeM=; b=TJqn6jFzLrmVbnpzPvmHg1ZeGEVHEjLyadpEKBSC8Xc+ZsWpSiKWoHYTRy2P9Zxik4v+7LtjU26H0c/NTZXgobGfWY7BmFUMg1o89L4L81Krem84TZfH6KURF+4+k6yiuAJqm3N8uSBJTd0idHzLMpdZFHTLeRvZZH1Qd8UsmuE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1612206579852945.0262675380231; Mon, 1 Feb 2021 11:09:39 -0800 (PST) Received: from localhost ([::1]:49988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6eZu-0005Vs-PT for importer@patchew.org; Mon, 01 Feb 2021 14:09:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eXz-0003ks-A9 for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:39 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:50040) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6eXx-0000Oz-Nd for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:39 -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-558-aFBTATnuPOKPHDOpzAKQKg-1; Mon, 01 Feb 2021 14:07:33 -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 EFDB081620; Mon, 1 Feb 2021 19:07:31 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03F8560C05; Mon, 1 Feb 2021 19:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612206457; 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=/UPzXrJ27AqJD479c69kO56oBloOrR2rW0hBBE0pdeM=; b=cTToOm+SSMojEm544KtCw/gEGP9ar6Oxs+XhrzB7/FONJW+7rNc0hVejmeuSe4bkQ4KckU kdZSMNV7192oXjU5qa19yR7RIXH5TpCTGcr/zoMxk4JFM3swAhGLro/kt8TLlVms/hOC7R 4ZRwSm71fet09BhOySYMsIqxoQpnIek= X-MC-Unique: aFBTATnuPOKPHDOpzAKQKg-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 2/6] block: Avoid processing BDS twice in bdrv_set_aio_context_ignore() Date: Mon, 1 Feb 2021 20:07:16 +0100 Message-Id: <20210201190720.245732-3-kwolf@redhat.com> In-Reply-To: <20210201190720.245732-1-kwolf@redhat.com> References: <20210201190720.245732-1-kwolf@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=kwolf@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=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Sergio Lopez Some graphs may contain an indirect reference to the first BDS in the chain that can be reached while walking it bottom->up from one its children. Doubling-processing of a BDS is especially problematic for the aio_notifiers, as they might attempt to work on both the old and the new AIO contexts. To avoid this problem, add every child and parent to the ignore list before actually processing them. Suggested-by: Kevin Wolf Signed-off-by: Sergio Lopez Message-Id: <20210201125032.44713-2-slp@redhat.com> Signed-off-by: Kevin Wolf --- block.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index 91a66d4f3e..5c428e1595 100644 --- a/block.c +++ b/block.c @@ -6439,7 +6439,10 @@ void bdrv_set_aio_context_ignore(BlockDriverState *b= s, AioContext *new_context, GSList **ignore) { AioContext *old_context =3D bdrv_get_aio_context(bs); - BdrvChild *child; + GSList *children_to_process =3D NULL; + GSList *parents_to_process =3D NULL; + GSList *entry; + BdrvChild *child, *parent; =20 g_assert(qemu_get_current_aio_context() =3D=3D qemu_get_aio_context()); =20 @@ -6454,16 +6457,33 @@ void bdrv_set_aio_context_ignore(BlockDriverState *= bs, continue; } *ignore =3D g_slist_prepend(*ignore, child); - bdrv_set_aio_context_ignore(child->bs, new_context, ignore); + children_to_process =3D g_slist_prepend(children_to_process, child= ); } - QLIST_FOREACH(child, &bs->parents, next_parent) { - if (g_slist_find(*ignore, child)) { + + QLIST_FOREACH(parent, &bs->parents, next_parent) { + if (g_slist_find(*ignore, parent)) { continue; } - assert(child->klass->set_aio_ctx); - *ignore =3D g_slist_prepend(*ignore, child); - child->klass->set_aio_ctx(child, new_context, ignore); + *ignore =3D g_slist_prepend(*ignore, parent); + parents_to_process =3D g_slist_prepend(parents_to_process, parent); + } + + for (entry =3D children_to_process; + entry !=3D NULL; + entry =3D g_slist_next(entry)) { + child =3D entry->data; + bdrv_set_aio_context_ignore(child->bs, new_context, ignore); + } + g_slist_free(children_to_process); + + for (entry =3D parents_to_process; + entry !=3D NULL; + entry =3D g_slist_next(entry)) { + parent =3D entry->data; + assert(parent->klass->set_aio_ctx); + parent->klass->set_aio_ctx(parent, new_context, ignore); } + g_slist_free(parents_to_process); =20 bdrv_detach_aio_context(bs); =20 --=20 2.29.2 From nobody Fri May 17 19:00:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612206587; cv=none; d=zohomail.com; s=zohoarc; b=fq9AD6pSatwa4uHRosBh+4gcRP0rOUSJnPOil7U6/gc7tw1x/w01C3lgBoTLwJImPSoX+76II0tz6im9kQfJdwnu071nl9vf9qpuw802OxTslmbqh17/8R/9MC9ZnLmXITxhuwo4a0yjGP8vezynCiRGiMA97H5UzSIdFsWlIEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612206587; 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=Gij5QeqtyE8f4Gz34t7KEJ33X71FNsnrFRF6nodtYrk=; b=leeOhTLijXn6lf2V3kDDGXY0zKJAqQD4L1DkEBFFwvmehTIQpLdE9emfG4EBxGgaZwlptrZooJebs3deOnsVtCmg9InVaX8AI4neC+VlB8NjKmA+4DlmSVgUKDasjQt18pHh/4zwG4gBuwMWAs7uTci1IIXSwFgWjkq6h9kaLAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1612206587090866.8235719880123; Mon, 1 Feb 2021 11:09:47 -0800 (PST) Received: from localhost ([::1]:50644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ea2-0005mC-16 for importer@patchew.org; Mon, 01 Feb 2021 14:09:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eY0-0003ms-At for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6eXy-0000PB-JY for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:40 -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-353-raozcOgqNGWLV2K9DMfUcA-1; Mon, 01 Feb 2021 14:07:36 -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 D5F6C8144E0; Mon, 1 Feb 2021 19:07:34 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44E5560C05; Mon, 1 Feb 2021 19:07:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612206458; 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=Gij5QeqtyE8f4Gz34t7KEJ33X71FNsnrFRF6nodtYrk=; b=L1bbBgOf1V0ESCjfwU3vblbp1K+7hvmCNt2Sjl6HP+Bcv3CfjEfHlzmSc6NW3Ot4dPfOhx stl2ffJXi3bbHhjFUiIo6Eqssl3sS80dQjjUMNvz2t+06Hhu/VYH44SF5qx3LMsZOY9FX7 onmATvnCWVbqkiQ4EKDa2QtBdTjYz4o= X-MC-Unique: raozcOgqNGWLV2K9DMfUcA-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 3/6] block: move blk_exp_close_all() to qemu_cleanup() Date: Mon, 1 Feb 2021 20:07:17 +0100 Message-Id: <20210201190720.245732-4-kwolf@redhat.com> In-Reply-To: <20210201190720.245732-1-kwolf@redhat.com> References: <20210201190720.245732-1-kwolf@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=kwolf@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=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Sergio Lopez Move blk_exp_close_all() from bdrv_close() to qemu_cleanup(), before bdrv_drain_all_begin(). Export drivers may have coroutines yielding at some point in the block layer, so we need to shut them down before draining the block layer, as otherwise they may get stuck blk_wait_while_drained(). RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=3D1900505 Signed-off-by: Sergio Lopez Message-Id: <20210201125032.44713-3-slp@redhat.com> Signed-off-by: Kevin Wolf --- block.c | 1 - qemu-nbd.c | 1 + softmmu/runstate.c | 9 +++++++++ storage-daemon/qemu-storage-daemon.c | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 5c428e1595..4e52b1c588 100644 --- a/block.c +++ b/block.c @@ -4435,7 +4435,6 @@ static void bdrv_close(BlockDriverState *bs) void bdrv_close_all(void) { assert(job_next(NULL) =3D=3D NULL); - blk_exp_close_all(); =20 /* Drop references from requests still in flight, such as canceled blo= ck * jobs whose AIO context has not been polled yet */ diff --git a/qemu-nbd.c b/qemu-nbd.c index 0d513cb38c..608c63e82a 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -503,6 +503,7 @@ static const char *socket_activation_validate_opts(cons= t char *device, static void qemu_nbd_shutdown(void) { job_cancel_sync_all(); + blk_exp_close_all(); bdrv_close_all(); } =20 diff --git a/softmmu/runstate.c b/softmmu/runstate.c index beee050815..a7fcb603f7 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "audio/audio.h" #include "block/block.h" +#include "block/export.h" #include "chardev/char.h" #include "crypto/cipher.h" #include "crypto/init.h" @@ -784,6 +785,14 @@ void qemu_cleanup(void) */ migration_shutdown(); =20 + /* + * Close the exports before draining the block layer. The export + * drivers may have coroutines yielding on it, so we need to clean + * them up before the drain, as otherwise they may be get stuck in + * blk_wait_while_drained(). + */ + blk_exp_close_all(); + /* * We must cancel all block jobs while the block layer is drained, * or cancelling will be affected by throttling and thus may block diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-sto= rage-daemon.c index e0c87edbdd..d8d172cc60 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -314,6 +314,7 @@ int main(int argc, char *argv[]) main_loop_wait(false); } =20 + blk_exp_close_all(); bdrv_drain_all_begin(); bdrv_close_all(); =20 --=20 2.29.2 From nobody Fri May 17 19:00:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612206839; cv=none; d=zohomail.com; s=zohoarc; b=lIxNv0p9759J7ciEDieVy45/sD4DkqoECJhvrE1RlI3b2+qy9SaXC/EGkq40jfKVY7O3jqmx4bEXI92CjsqjXLIeQp4Ft8JxBGckxRvNFIuK3y7xXS6d4NhSYgKrbQpVwN9q+mATqZ4uC/A1Bglkr9UFb4QWjBToBlQupBi1zG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612206839; 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=x+Io9i83GPm6P+bB5eHK+MVUhvNuLf4Qi0NXyUQtYnw=; b=gw+itKiw6bdQZGdWWuKi38a3DKuVkPcHYr4PT44glnOgG7bIVOLRyT2wkf4bSdj2Wpi+4ir0LY7moEwhYGWb96CrsPTSTIM4z0Iy7LWqCMdAFUU9XRRlHNRI80PNi1zCCV3QZXHVhY7L7MJURklqe1OUIUvbGPKs0wIX0OmOy6o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1612206839021823.2594917483897; Mon, 1 Feb 2021 11:13:59 -0800 (PST) Received: from localhost ([::1]:57778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ee5-0000OZ-A4 for importer@patchew.org; Mon, 01 Feb 2021 14:13:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eY9-0003vn-3Y for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6eY6-0000So-B7 for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07: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-583-7Upvk8H1OqKP5dxsMaO6MQ-1; Mon, 01 Feb 2021 14:07:41 -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 68DBB81622; Mon, 1 Feb 2021 19:07:40 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B5F060C05; Mon, 1 Feb 2021 19:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612206464; 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=x+Io9i83GPm6P+bB5eHK+MVUhvNuLf4Qi0NXyUQtYnw=; b=V3jWhaqf3/KhlA2u69Ya1T2zuHQ6l2NjA7EzVRHYq0Y+iFn+bI7I8iCHXY3BV7paghlcE0 mcCgBnZUxBIwh9TMjTrD60s/Zovxj2ADGCBEvR1Z7COslqsOry0Wk50h7VNQnt2C3yFoVX SrvCkU6fgrdkSLjdsf7qIEUcZeQIqkE= X-MC-Unique: 7Upvk8H1OqKP5dxsMaO6MQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 4/6] iotests/297: pylint: ignore too many statements Date: Mon, 1 Feb 2021 20:07:18 +0100 Message-Id: <20210201190720.245732-5-kwolf@redhat.com> In-Reply-To: <20210201190720.245732-1-kwolf@redhat.com> References: <20210201190720.245732-1-kwolf@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=kwolf@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=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy Ignore two complains, which now lead to 297 failure on testenv.py and testrunner.py. Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476 Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628 Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210129161323.615027-1-vsementsov@virtuozzo.com> Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- tests/qemu-iotests/pylintrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc index cd3702e23c..7a6c0a9474 100644 --- a/tests/qemu-iotests/pylintrc +++ b/tests/qemu-iotests/pylintrc @@ -21,6 +21,8 @@ disable=3Dinvalid-name, unsubscriptable-object, # These are temporary, and should be removed: missing-docstring, + too-many-return-statements, + too-many-statements =20 [FORMAT] =20 --=20 2.29.2 From nobody Fri May 17 19:00:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612206856; cv=none; d=zohomail.com; s=zohoarc; b=A0pCjYCGtWkSl7irw+R7TvCUV5N5THo/tNWZ8bOd80du8beOX2ggDv3f6eOnc9qweWhjmp7e1ZzTkOmQjGXyF6bARKWqA6FJTvRW0odZd1p0olJl2VlYMg5YzMKEfI5aPCyGc8Ph4QrAvWEkaKrQ3J5lOsAL88033yPt5CZJOdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612206856; 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=cSrh8DpqUPbw6Eh5CY3/TMs7gvPWCQ4tRhHELYHGwMc=; b=n6TU7IymCmXPmDTUc0laez9LAPGVXwJ4x6FIV9Dn/HuoRNp/jTuOi3RiyzIh6GFR0+K4Lwuc/I3AlvzvmkSM4W7w4ZK/JZ11FFqKlH917yIvvuHFlmfAlUPIP1EKPl9fLnG0zQmKddREZ9IX5LKnI3S9tUyzKFOXGJnTPKNCzfY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1612206856719532.0420602726493; Mon, 1 Feb 2021 11:14:16 -0800 (PST) Received: from localhost ([::1]:58516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6eeN-0000jA-HX for importer@patchew.org; Mon, 01 Feb 2021 14:14:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eYA-0003vq-5R for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6eY6-0000Sx-BD for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07: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-547-eH9yIP2HO9mWZe-iWbA5gw-1; Mon, 01 Feb 2021 14:07:42 -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 AACA218C89CF; Mon, 1 Feb 2021 19:07:41 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2C7A60C05; Mon, 1 Feb 2021 19:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612206464; 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=cSrh8DpqUPbw6Eh5CY3/TMs7gvPWCQ4tRhHELYHGwMc=; b=R3DYAYPfDjk1jOPBSThiCM4tCWL0GewZv5dXAMJVtoR9oVcZTlmIM3xisV2HEUpmqFbndt 3uyogUhvBxrKFy9Su3mXEYeaiAITOQCjQW4atRsOhoFq+Hs+rr4JhKDVhGJKoJa42m4Fsq o9ZfVNNl3FN9C5embpmDK4djSfma1W0= X-MC-Unique: eH9yIP2HO9mWZe-iWbA5gw-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 5/6] iotests: check: return 1 on failure Date: Mon, 1 Feb 2021 20:07:19 +0100 Message-Id: <20210201190720.245732-6-kwolf@redhat.com> In-Reply-To: <20210201190720.245732-1-kwolf@redhat.com> References: <20210201190720.245732-1-kwolf@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=kwolf@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=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy We should indicate failure by exit code, not only output. Reported-by: Peter Maydell Fixes: f203080bbd9f9e5b31041b1f2afcd6040c5aaec5 Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210201085041.3079-1-vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/testrunner.py | 4 +++- tests/qemu-iotests/check | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunn= er.py index 24b3fba115..25754e9a09 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -318,7 +318,7 @@ class TestRunner(ContextManager['TestRunner']): =20 return res =20 - def run_tests(self, tests: List[str]) -> None: + def run_tests(self, tests: List[str]) -> bool: n_run =3D 0 failed =3D [] notrun =3D [] @@ -363,5 +363,7 @@ class TestRunner(ContextManager['TestRunner']): if failed: print('Failures:', ' '.join(failed)) print(f'Failed {len(failed)} of {n_run} iotests') + return False else: print(f'Passed all {n_run} iotests') + return True diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 5190dee82e..d1c87ceaf1 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -140,4 +140,7 @@ if __name__ =3D=3D '__main__': else: with TestRunner(env, makecheck=3Dargs.makecheck, color=3Dargs.color) as tr: - tr.run_tests([os.path.join(env.source_iotests, t) for t in tes= ts]) + paths =3D [os.path.join(env.source_iotests, t) for t in tests] + ok =3D tr.run_tests(paths) + if not ok: + sys.exit(1) --=20 2.29.2 From nobody Fri May 17 19:00:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612207120; cv=none; d=zohomail.com; s=zohoarc; b=McsVDQzVe1+qf4zUWlTIidMyn55FPKqwd3QngSGT0DMG34/8B/pZw32ZsfO9z+rc0ScQdECaHY0jsWemLTUCnMz+mZiiTLIjukiBql9PjlI6dLoiaKlmvkeSiU5X02ZBHdyTAAnAWzLz4T24krcCham9cQITIKZsK8ajdQNFGic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612207120; 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=E2W1HGEgCNWOCZS4CT3q/hTS9q/xlepHrVHCPnJh7Cs=; b=bg149FQPv78ibbRU4lLFP1kumCWRZJuArBg0nUos1CASE7iFn/qWcGhy+wHXRIibCPybxjxFxUkXd3LUl22ZRzl+tBPlikV55TgISKiZVlxwV8sgDYETSUhe/B9SHb2vlX4APZ5PfAcud2uF6BtYYs1ERj0sEZ+hpR5WinVNeCA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1612207120679410.2196359255629; Mon, 1 Feb 2021 11:18:40 -0800 (PST) Received: from localhost ([::1]:35480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6eid-00035D-Kd for importer@patchew.org; Mon, 01 Feb 2021 14:18:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eYC-0003wX-TF for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6eY7-0000Te-Cn for qemu-devel@nongnu.org; Mon, 01 Feb 2021 14:07:52 -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-143-otynvm3sN3-Vi43tla98gw-1; Mon, 01 Feb 2021 14:07:44 -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 EE0461800D41; Mon, 1 Feb 2021 19:07:42 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 004E960C05; Mon, 1 Feb 2021 19:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612206466; 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=E2W1HGEgCNWOCZS4CT3q/hTS9q/xlepHrVHCPnJh7Cs=; b=ZB38GLaFKGbIseIWateKkpKzZ6vBAk6BB3QDZ8kDQ0GB6kcBQsTup/GW+u29+csOafjDYh nYadaaqaZjwsMvHJ54D5T5Z4FalkemL5Ur15MB8Je438wLBoF1PVDt3CcqJPgUnrmW0VxC Orw+oX/P6jiwRupU9a/Hol/nCR5QfYs= X-MC-Unique: otynvm3sN3-Vi43tla98gw-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 6/6] iotests: Fix -makecheck output Date: Mon, 1 Feb 2021 20:07:20 +0100 Message-Id: <20210201190720.245732-7-kwolf@redhat.com> In-Reply-To: <20210201190720.245732-1-kwolf@redhat.com> References: <20210201190720.245732-1-kwolf@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=kwolf@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=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" For -makecheck, the old 'check' implementation skipped the output when starting a test. It only had the condensed output at the end of a test. testrunner.py prints the normal output when starting a test even for -makecheck. This output contains '\r' at the end so that it can be overwritten with the result at the end of the test. However, for -makecheck this is shorter output in a different format, so effectively we end up with garbled output that mixes both output forms. Revert to the old behaviour of only printing a message after the test had completed in -makecheck mode. Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628 Signed-off-by: Kevin Wolf Message-Id: <20210201161024.127921-1-kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- tests/qemu-iotests/testrunner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunn= er.py index 25754e9a09..1fc61fcaa3 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -301,8 +301,10 @@ class TestRunner(ContextManager['TestRunner']): last_el =3D self.last_elapsed.get(test) start =3D datetime.datetime.now().strftime('%H:%M:%S') =20 - self.test_print_one_line(test=3Dtest, starttime=3Dstart, lasttime= =3Dlast_el, - end=3D'\r', test_field_width=3Dtest_field= _width) + if not self.makecheck: + self.test_print_one_line(test=3Dtest, starttime=3Dstart, + lasttime=3Dlast_el, end=3D'\r', + test_field_width=3Dtest_field_width) =20 res =3D self.do_run_test(test) =20 --=20 2.29.2