From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497449; cv=none; d=zohomail.com; s=zohoarc; b=kJ/P6QyrO5USAq0Qxliu1KPVroGL5A1MqYYWIZfzMHoPJYtJY61G8bBM9wGXXBl/8JhNnXrTT9exgAr8Qb5oDOgBbNvgtbIOWNIvuKtK1NSb4JkgLBEF80ThlRfh9seNnf9G48ys/KBwe9rqIZKSKw4ufERY0UuXmgNBAH5brdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497449; 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=D66ZJ9doAOBqpZuX0Fp0PUUAIy5q4B7C5LkjWRve3AU=; b=fX/yI2llTyII/IcL1phVIIEcTzayjXuZuq6uksWjPc248W7q8981cAMEdeJeJXiaDTGjELIGz08eZJn99TGHxynKJXh0AebDZ7QSJO2yUjnXEhzzN3SVQLOpik1hQn7dcfuSr0IQ89nfS+vCBYDPPxFF+Q5QWa9Ce9iv7e/e3nQ= 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+importer2=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 162149744982925.14119740750266; Thu, 20 May 2021 00:57:29 -0700 (PDT) Received: from localhost ([::1]:46526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdYe-00009a-Mn for importer2@patchew.org; Thu, 20 May 2021 03:57:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdV0-00030A-IO for qemu-devel@nongnu.org; Thu, 20 May 2021 03:53:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdUy-0006Dg-7R for qemu-devel@nongnu.org; Thu, 20 May 2021 03:53:42 -0400 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-550-silLzt_zMAS5rV0hScrv5w-1; Thu, 20 May 2021 03:53:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 998258064A7; Thu, 20 May 2021 07:53:21 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7D447863D; Thu, 20 May 2021 07:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497219; 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=D66ZJ9doAOBqpZuX0Fp0PUUAIy5q4B7C5LkjWRve3AU=; b=hLu9+qQMdVMdLy7yARdS70ejy3CrHBpyGZ8NmIGUdS38+gCSD9v3RHETd6v72g39r1mNmH ktASNALVdIHH2zvmLzhSjVys+V5G9DAyZF/AGYpcgQSZM61SPTBSlH7Av6KbYFu1K2yn2/ 6y3E6lqPzMzbAsTF0HnJVCyrm1Ral3Y= X-MC-Unique: silLzt_zMAS5rV0hScrv5w-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 01/15] python: qemu: add timer parameter for qmp.accept socket Date: Thu, 20 May 2021 09:52:22 +0200 Message-Id: <20210520075236.44723-2-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Alsp add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be 15 seconds in iotests.py, to give an upper bound to qemu-iotests execution. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/machine.py | 7 +++++-- python/qemu/qtest.py | 5 +++-- tests/qemu-iotests/iotests.py | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 6e44bda337..df32de4377 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -89,7 +89,8 @@ def __init__(self, socket_scm_helper: Optional[str] =3D None, sock_dir: Optional[str] =3D None, drain_console: bool =3D False, - console_log: Optional[str] =3D None): + console_log: Optional[str] =3D None, + qmp_timer: Optional[float] =3D None): ''' Initialize a QEMUMachine =20 @@ -103,6 +104,7 @@ def __init__(self, @param sock_dir: where to create socket (overrides test_dir for so= ck) @param drain_console: (optional) True to drain console socket to b= uffer @param console_log: (optional) path to console log file + @param qmp_timer: (optional) default QMP socket timeout @note: Qemu process is not started until launch() is used. ''' # Direct user configuration @@ -110,6 +112,7 @@ def __init__(self, self._binary =3D binary self._args =3D list(args) self._wrapper =3D wrapper + self._qmp_timer =3D qmp_timer =20 self._name =3D name or "qemu-%d" % os.getpid() self._test_dir =3D test_dir @@ -323,7 +326,7 @@ def _pre_launch(self) -> None: =20 def _post_launch(self) -> None: if self._qmp_connection: - self._qmp.accept() + self._qmp.accept(self._qmp_timer) =20 def _post_shutdown(self) -> None: """ diff --git a/python/qemu/qtest.py b/python/qemu/qtest.py index 39a0cf62fe..afea210d9d 100644 --- a/python/qemu/qtest.py +++ b/python/qemu/qtest.py @@ -114,14 +114,15 @@ def __init__(self, name: Optional[str] =3D None, test_dir: str =3D "/var/tmp", socket_scm_helper: Optional[str] =3D None, - sock_dir: Optional[str] =3D None): + sock_dir: Optional[str] =3D None, + qmp_timer: Optional[float] =3D None): if name is None: name =3D "qemu-%d" % os.getpid() if sock_dir is None: sock_dir =3D test_dir super().__init__(binary, args, name=3Dname, test_dir=3Dtest_dir, socket_scm_helper=3Dsocket_scm_helper, - sock_dir=3Dsock_dir) + sock_dir=3Dsock_dir, qmp_timer=3Dqmp_timer) self._qtest: Optional[QEMUQtestProtocol] =3D None self._qtest_path =3D os.path.join(sock_dir, name + "-qtest.sock") =20 diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index ec3c69daf1..5d78de0f0b 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -571,10 +571,11 @@ class VM(qtest.QEMUQtestMachine): =20 def __init__(self, path_suffix=3D''): name =3D "qemu%s-%d" % (path_suffix, os.getpid()) + timer =3D 15.0 super().__init__(qemu_prog, qemu_opts, name=3Dname, test_dir=3Dtest_dir, socket_scm_helper=3Dsocket_scm_helper, - sock_dir=3Dsock_dir) + sock_dir=3Dsock_dir, qmp_timer=3Dtimer) self._num_drives =3D 0 =20 def add_object(self, opts): --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497363; cv=none; d=zohomail.com; s=zohoarc; b=R0NZcn5JhwwvpbwWkaNV/ZJsSQUjBCeCEYTqFHiVnnQa8n4uGnzZSe33iSrScAj2CZED6eoBAGALGw0cOFs5jRYwNKDLsGqcQgnhEYmX00DCeAkkbtkqVNLqjCKyVf/WoU2qKAIvO+XGfoH6zH3qGy7+AO96/y/937DSHgRBYuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497363; 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=gnLZhXzeyuePv2rz40rjP8/b8BdJduZrCtJ8BO1IMVo=; b=Fjrx6uFkAbXTzVGJLouWUkK2jH1j0IQt0PbZCVdvM2a6/breIOiw+ouHlCT1aeHZgiXnj6GrLBOgVNeo1ZvGk5zqOj2/JIAV8Xa1mc/10luVLWSTVhF3lz6IALaEuR9X6l277+9rgf1I9dV1Hr+jtPa9sN2idxmRdKvft2ct9BQ= 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+importer2=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 1621497363050915.8670495275283; Thu, 20 May 2021 00:56:03 -0700 (PDT) Received: from localhost ([::1]:42674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdXF-0005y0-UC for importer2@patchew.org; Thu, 20 May 2021 03:56:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdV8-0003EV-J9 for qemu-devel@nongnu.org; Thu, 20 May 2021 03:53:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdV6-0006Kv-UF for qemu-devel@nongnu.org; Thu, 20 May 2021 03:53:50 -0400 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-429-GqoDrOZGMHurAZFajhoRgw-1; Thu, 20 May 2021 03:53:46 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0911D8B2057; Thu, 20 May 2021 07:53:24 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA58C69102; Thu, 20 May 2021 07:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497228; 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=gnLZhXzeyuePv2rz40rjP8/b8BdJduZrCtJ8BO1IMVo=; b=JQocFuNxd7p/mjuQPVlq6k+4E52ypzhRqXXIfjbOxDxmAc/ErDfm1gcJvyOCmvsCy8Dbie QCtWhfAaQuSJDyEbL8n4SDuzSekfIVTtxaxqZg5nogprfXCyADN+GT0sGy63N7/jNPXk2c f5nCD+czbMx+cl3xhck0vJd1OBuDY3M= X-MC-Unique: GqoDrOZGMHurAZFajhoRgw-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 02/15] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine Date: Thu, 20 May 2021 09:52:23 +0200 Message-Id: <20210520075236.44723-3-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/qtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/qemu/qtest.py b/python/qemu/qtest.py index afea210d9d..e6a8fb5984 100644 --- a/python/qemu/qtest.py +++ b/python/qemu/qtest.py @@ -111,6 +111,7 @@ class QEMUQtestMachine(QEMUMachine): def __init__(self, binary: str, args: Sequence[str] =3D (), + wrapper: Sequence[str] =3D (), name: Optional[str] =3D None, test_dir: str =3D "/var/tmp", socket_scm_helper: Optional[str] =3D None, @@ -120,7 +121,8 @@ def __init__(self, name =3D "qemu-%d" % os.getpid() if sock_dir is None: sock_dir =3D test_dir - super().__init__(binary, args, name=3Dname, test_dir=3Dtest_dir, + super().__init__(binary, args, wrapper=3Dwrapper, name=3Dname, + test_dir=3Dtest_dir, socket_scm_helper=3Dsocket_scm_helper, sock_dir=3Dsock_dir, qmp_timer=3Dqmp_timer) self._qtest: Optional[QEMUQtestProtocol] =3D None --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497383; cv=none; d=zohomail.com; s=zohoarc; b=HLGni0n+THJbc0pP6ZXWYSkHaNfk9N6RIxgcChaq+qMyRt4m+liSVjyJEuhdzqeFKSzPW4LHSUs4lOMzFSwS8pm/1Pw5KJCrkxyLksjfC1+4ZLueGbDnV2w2LsM7aHQPsbNWvfzpt83fgT2h5KXSqENWRM8Xgrh4UXhrbZwS9Q0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497383; 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=wFG5g+GAZozjb7SaNfbi5cnAb8Bb64SceKpex9iJFD4=; b=a0pY2aDNbxA7vqeNBcDOBSzX39sL9YCYl09KqqDre8IxX9dFu6IOGXXRNEO7xWf0osH73tIuMq+QJP+yDGih5P2yctoh3m/3RNtO+YvkXRWyRhvJgwJNYm/XUKEi5mCSkRXw433D2wEevSHX9UfbBsgZv2ApsvZ5oQOi2KIeVxc= 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+importer2=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 1621497383692820.7720671975832; Thu, 20 May 2021 00:56:23 -0700 (PDT) Received: from localhost ([::1]:43774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdXa-0006gr-Iw for importer2@patchew.org; Thu, 20 May 2021 03:56:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVI-0003ht-DK for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVF-0006Sl-ON for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:00 -0400 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-441-ZJX0P7hlOi2omwswusluAQ-1; Thu, 20 May 2021 03:53:55 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AAC801043DCA; Thu, 20 May 2021 07:53:26 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6660069FB1; Thu, 20 May 2021 07:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497237; 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=wFG5g+GAZozjb7SaNfbi5cnAb8Bb64SceKpex9iJFD4=; b=TnI7ATTsaI5aiVMqca00NFltqA/va5VCaRsCpnhzJh5O7zZrUlNW8tts37g+lceXz71pQl /YUImn12TGIGATt4YKDbV8ykTRhBuWMTCOkWHMYvpzTS7HhWJd3sYzUJyuh/hSLzwurR// 3nhKrnz4XAqREL7O5j9WEevsHTPYBXE= X-MC-Unique: ZJX0P7hlOi2omwswusluAQ-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 03/15] docs/devel/testing: add debug section to the QEMU iotests chapter Date: Thu, 20 May 2021 09:52:24 +0200 Message-Id: <20210520075236.44723-4-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Introduce the "Debugging a test case" section, in preparation to the additional flags that will be added in the next patches. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 1da4c4e4c4..8144e316a4 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -224,6 +224,14 @@ another application on the host may have locked the fi= le, possibly leading to a test failure. If using such devices are explicitly desired, consider addi= ng ``locking=3Doff`` option to disable image locking. =20 +Debugging a test case +----------------------- +The following options to the ``check`` script can be useful when debugging +a failing test: + +* ``-d`` (debug) just increases the logging verbosity, showing + for example the QMP commands and answers. + Test case groups ---------------- =20 --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497379; cv=none; d=zohomail.com; s=zohoarc; b=PxvzawjBhqcRfvcAWO0egtFYQmXYuAehHHIRIRDeEx3B/wQ6u47gANPfQ0z1gYzUgvMuVyqn+F72ryG8bngGUguokCDXhHqWURWAcn3Jyg+JSh7kFVFhNHKJjGmZ93ruo7mYMWWqUt0RdJ8S8q61Hwply3Yh060T3Witgfmx7mM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497379; 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=spF0h4xFeW1SU3hXrvcrjfsJlYUm6TLQT1lgC+7UuYc=; b=Dz4QxNvxBaXshSdzQjndTlghk5SbTvUsKXgLmRjSl3f4mtuebLimUH8mLj9tQT3JM0Y8NX04T7SonCjFd+xCNzdF+w97jz61iZFRmNDem/KgtV1KG/G8oOUIzq2ZDL89nVyLifrz7vPWI+7fGvVqpSnQ9TmBmN57ZJl2RlW8Ro4= 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+importer2=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 1621497379768641.9426229405168; Thu, 20 May 2021 00:56:19 -0700 (PDT) Received: from localhost ([::1]:43622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdXW-0006ae-6q for importer2@patchew.org; Thu, 20 May 2021 03:56:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVG-0003dN-Vw for qemu-devel@nongnu.org; Thu, 20 May 2021 03:53:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVF-0006Rn-25 for qemu-devel@nongnu.org; Thu, 20 May 2021 03:53:58 -0400 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-377-62qs-eYYPvuHaZoR3V8B7Q-1; Thu, 20 May 2021 03:53:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74FEC80295E; Thu, 20 May 2021 07:53:29 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 148CF690F3; Thu, 20 May 2021 07:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497236; 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=spF0h4xFeW1SU3hXrvcrjfsJlYUm6TLQT1lgC+7UuYc=; b=HBmyRxZRJjkhGJUzgUuD74tvwsznukUj9o5+1cExPlKMQepUZCAXFeRZ8/L71mc6NX3m3h mu/aXHPHj87wYTDQvM6POlqqz6c8N+QgU9Aqe6mB0qFqVfDbeehkMEwBnaFg9U5OVBwWQ9 SuVEQjhrJ7XSqhRiaKD3ROjerklC0/A= X-MC-Unique: 62qs-eYYPvuHaZoR3V8B7Q-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 04/15] qemu-iotests: add option to attach gdbserver Date: Thu, 20 May 2021 09:52:25 +0200 Message-Id: <20210520075236.44723-5-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Define -gdb flag and GDB_OPTIONS environment variable to python tests to attach a gdbserver to each qemu instance. This patch only adds and parses this flag, it does not yet add the implementation for it. if -gdb is not provided but $GDB_OPTIONS is set, ignore the environment variable. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/check | 6 +++++- tests/qemu-iotests/iotests.py | 5 +++++ tests/qemu-iotests/testenv.py | 19 ++++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index d1c87ceaf1..b9820fdaaf 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -33,6 +33,9 @@ def make_argparser() -> argparse.ArgumentParser: help=3D'pretty print output for make check') =20 p.add_argument('-d', dest=3D'debug', action=3D'store_true', help=3D'de= bug') + p.add_argument('-gdb', action=3D'store_true', + help=3D"start gdbserver with $GDB_OPTIONS options \ + ('localhost:12345' if $GDB_OPTIONS is empty)") p.add_argument('-misalign', action=3D'store_true', help=3D'misalign memory allocations') p.add_argument('--color', choices=3D['on', 'off', 'auto'], @@ -112,7 +115,8 @@ if __name__ =3D=3D '__main__': env =3D TestEnv(imgfmt=3Dargs.imgfmt, imgproto=3Dargs.imgproto, aiomode=3Dargs.aiomode, cachemode=3Dargs.cachemode, imgopts=3Dargs.imgopts, misalign=3Dargs.misalign, - debug=3Dargs.debug, valgrind=3Dargs.valgrind) + debug=3Dargs.debug, valgrind=3Dargs.valgrind, + gdb=3Dargs.gdb) =20 testfinder =3D TestFinder(test_dir=3Denv.source_iotests) =20 diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 5d78de0f0b..d667fde6f8 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -75,6 +75,11 @@ qemu_prog =3D os.environ.get('QEMU_PROG', 'qemu') qemu_opts =3D os.environ.get('QEMU_OPTIONS', '').strip().split(' ') =20 +gdb_qemu_env =3D os.environ.get('GDB_OPTIONS') +qemu_gdb =3D [] +if gdb_qemu_env: + qemu_gdb =3D ['gdbserver'] + gdb_qemu_env.strip().split(' ') + imgfmt =3D os.environ.get('IMGFMT', 'raw') imgproto =3D os.environ.get('IMGPROTO', 'file') output_dir =3D os.environ.get('OUTPUT_DIR', '.') diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 6d27712617..49ddd586ef 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -27,6 +27,7 @@ import glob from typing import Dict, Any, Optional, ContextManager =20 +DEF_GDB_OPTIONS =3D 'localhost:12345' =20 def isxfile(path: str) -> bool: return os.path.isfile(path) and os.access(path, os.X_OK) @@ -72,7 +73,8 @@ class TestEnv(ContextManager['TestEnv']): 'QEMU_NBD_OPTIONS', 'IMGOPTS', 'IMGFMT', 'IMGPROTO', 'AIOMODE', 'CACHEMODE', 'VALGRIND_QEMU', 'CACHEMODE_IS_DEFAULT', 'IMGFMT_GENERIC', 'IMGOPTSSYN= TAX', - 'IMGKEYSECRET', 'QEMU_DEFAULT_MACHINE', 'MALLOC_PERTU= RB_'] + 'IMGKEYSECRET', 'QEMU_DEFAULT_MACHINE', 'MALLOC_PERTU= RB_', + 'GDB_OPTIONS'] =20 def get_env(self) -> Dict[str, str]: env =3D {} @@ -163,7 +165,8 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, imgopts: Optional[str] =3D None, misalign: bool =3D False, debug: bool =3D False, - valgrind: bool =3D False) -> None: + valgrind: bool =3D False, + gdb: bool =3D False) -> None: self.imgfmt =3D imgfmt self.imgproto =3D imgproto self.aiomode =3D aiomode @@ -171,6 +174,14 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode= : str, self.misalign =3D misalign self.debug =3D debug =20 + if gdb: + self.gdb_options =3D os.environ.get('GDB_OPTIONS', DEF_GDB_OPT= IONS) + if not self.gdb_options: + # cover the case 'export GDB_OPTIONS=3D' + self.gdb_options =3D DEF_GDB_OPTIONS + elif 'GDB_OPTIONS' in os.environ: + del os.environ['GDB_OPTIONS'] + if valgrind: self.valgrind_qemu =3D 'y' =20 @@ -269,7 +280,9 @@ def print_env(self) -> None: PLATFORM -- {platform} TEST_DIR -- {TEST_DIR} SOCK_DIR -- {SOCK_DIR} -SOCKET_SCM_HELPER -- {SOCKET_SCM_HELPER}""" +SOCKET_SCM_HELPER -- {SOCKET_SCM_HELPER} +GDB_OPTIONS -- {GDB_OPTIONS} +""" =20 args =3D collections.defaultdict(str, self.get_env()) =20 --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497611; cv=none; d=zohomail.com; s=zohoarc; b=kmaicTwyR0noltrHdHL8g3RxzAYStRXzOmD4+48qIi8LsTBDTPg5q+BRd5RRbnP3KVth7ujnRDZgNnVnnq5+pBlC45q3uHmMi/bEJcHZqe9Avs1u8RH+y+ilGHjX8lUiP8PwK3aHQ0KqdJrj+7of1Wrsouo2+dzS++mdP3PXkoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497611; 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=wTZrYZI5OEc+UDDYIdbtXn7J1mBo0UaAr0aBkY4zOTg=; b=U/4LC0G4c/pYGAQbIIodiI/s1+rgR+9pT5g31t15rM7fuNAKdVTfok0pi4KUPOEWI3lJotjVIoFTBfp+0JeynzLM7ZTY51GefQcpMEzM5l/dwKfcK3is/jkE5vYvifhCT3OphX4OUX/RbF+gaCGmNFJ2BjMgCq/FtkWIrbTgPHE= 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+importer2=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 1621497611844772.2372424722413; Thu, 20 May 2021 01:00:11 -0700 (PDT) Received: from localhost ([::1]:55770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdbG-0006QN-Nn for importer2@patchew.org; Thu, 20 May 2021 04:00:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVI-0003iT-NA for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVG-0006Sq-At for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:00 -0400 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-367-U8ndOd2nMHaANiJLrWo68Q-1; Thu, 20 May 2021 03:53:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 042711922978; Thu, 20 May 2021 07:53:32 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAFD2690F3; Thu, 20 May 2021 07:53:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497237; 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=wTZrYZI5OEc+UDDYIdbtXn7J1mBo0UaAr0aBkY4zOTg=; b=Sp1B6xUqSF9K6HhuYPLC7UDxjRZ391tiXhPGrrt/+al07zYWfNfbVhr2kAYxC1ZEC5k+j2 m0Iide1qMxorz/lk+A5inlHcUq1dF5D+ihY3CZiQMWG4tGmsZVwrteV0J9kSPCbff25IrV oO83F2001zm1NGUA76N+4KOz+IWm/GA= X-MC-Unique: U8ndOd2nMHaANiJLrWo68Q-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 05/15] qemu-iotests: delay QMP socket timers Date: Thu, 20 May 2021 09:52:26 +0200 Message-Id: <20210520075236.44723-6-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Attaching gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index d667fde6f8..cf1ca60376 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -478,11 +478,13 @@ def __init__(self, seconds, errmsg=3D"Timeout"): self.seconds =3D seconds self.errmsg =3D errmsg def __enter__(self): - signal.signal(signal.SIGALRM, self.timeout) - signal.setitimer(signal.ITIMER_REAL, self.seconds) + if not qemu_gdb: + signal.signal(signal.SIGALRM, self.timeout) + signal.setitimer(signal.ITIMER_REAL, self.seconds) return self def __exit__(self, exc_type, value, traceback): - signal.setitimer(signal.ITIMER_REAL, 0) + if not qemu_gdb: + signal.setitimer(signal.ITIMER_REAL, 0) return False def timeout(self, signum, frame): raise Exception(self.errmsg) @@ -576,7 +578,7 @@ class VM(qtest.QEMUQtestMachine): =20 def __init__(self, path_suffix=3D''): name =3D "qemu%s-%d" % (path_suffix, os.getpid()) - timer =3D 15.0 + timer =3D 15.0 if not qemu_gdb else None super().__init__(qemu_prog, qemu_opts, name=3Dname, test_dir=3Dtest_dir, socket_scm_helper=3Dsocket_scm_helper, --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497573; cv=none; d=zohomail.com; s=zohoarc; b=Zg4cdl2j10iFUbX9l+lNFa7Pu0HkaxPu2/9IwRhK1AVBqOEn0XhcgTd6DgTPg+em3OpJgExT0+t4cWn4vKrE2c2p4JMq4TMSFpnBYbS9J/oqks2p26JKYlN3wLjp3VXqtlm9IBbzn3WJy4V2Xj3lekUOljQ7OQIa/e8GVPAhUeo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497573; 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=y30IOsdSSuzdcJaNKgv/DSKd6026N3UPYPO4q7j1eOc=; b=DPz/WIq6Fe/Q7V7tolZukwB5Fvsb7llQYKiYln91Jkmt9qlFr7WlIozvnKDR/nCSdkqXg8PIdlJm6lLY5qMgZLgYBArjl6GIkLi+BV0DDQsgPqWcwTqqz3Xw0BkK1rqfIo3qozspenZXf+/3JXH7Fn/vYnJGIs3nfxr6CnlP710= 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+importer2=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 1621497573769905.585812946368; Thu, 20 May 2021 00:59:33 -0700 (PDT) Received: from localhost ([::1]:52174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdae-0003y3-H5 for importer2@patchew.org; Thu, 20 May 2021 03:59:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVI-0003iz-Qq for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVG-0006T0-Pi for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:00 -0400 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-453-xPnIYkaDMBSp64VUbEsOvQ-1; Thu, 20 May 2021 03:53:57 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A705B192299F; Thu, 20 May 2021 07:53:34 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 641BC6E6FF; Thu, 20 May 2021 07:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497238; 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=y30IOsdSSuzdcJaNKgv/DSKd6026N3UPYPO4q7j1eOc=; b=L8NQHPV5ZP2NiT2HLETzUCYHrFWQqWFv78kkP5BZPba2PrQKbi1iby/NjGKRcBHnjomtwK eg7qyPa8I7CgpLt5xqzRSrTdELRfxprKipFCybG7LDDvGLsflsAlj+ysq0o2JwXOID04o5 pdSgML9EFLxck28k8WmxZn9mRCr/lgg= X-MC-Unique: xPnIYkaDMBSp64VUbEsOvQ-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 06/15] qemu_iotests: insert gdbserver command line as wrapper for qemu binary Date: Thu, 20 May 2021 09:52:27 +0200 Message-Id: <20210520075236.44723-7-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=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: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index cf1ca60376..c9628e6828 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -579,7 +579,8 @@ class VM(qtest.QEMUQtestMachine): def __init__(self, path_suffix=3D''): name =3D "qemu%s-%d" % (path_suffix, os.getpid()) timer =3D 15.0 if not qemu_gdb else None - super().__init__(qemu_prog, qemu_opts, name=3Dname, + super().__init__(qemu_prog, qemu_opts, wrapper=3Dqemu_gdb, + name=3Dname, test_dir=3Dtest_dir, socket_scm_helper=3Dsocket_scm_helper, sock_dir=3Dsock_dir, qmp_timer=3Dtimer) --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621498001; cv=none; d=zohomail.com; s=zohoarc; b=A/OPIkgNQrS5pVeptGXzIuvFuIqQevz8wzpDmS3xIYj7jcEq7Mi6MtXgHUHm0C3pK5RQLAeZ7ga9rEzEgwXzHlrcNg9LyP/URFFVeHm4ZmKnSZKm8p30MEOrwi75OzQ+e2APMl8SDx8CXRuQyKyXHJHqR67ieZqmihTxCroXvew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621498001; 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=DXT56+RtXU8sE6a/uh2xXwfuyUIKgyQGnHPxgWq6b6M=; b=Mzdhb80goSpuZysNvXL5Z7bg6japj+fPMSjPjyZYSVsaeQlUpZqTA2AsGzE3RqOQ7PL5WgyQ4hSN8o/C/3LsYvNdFVoIUSijRqiZ4NlG8n9nzaJ3s19C1SrCBCiQVsy00p+OVhUZbf+2b7UCnsiYKWEgCvGPQ9k7KwmRhYf6+iM= 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+importer2=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 1621498001621824.4724058886981; Thu, 20 May 2021 01:06:41 -0700 (PDT) Received: from localhost ([::1]:43238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdhY-0000Na-I9 for importer2@patchew.org; Thu, 20 May 2021 04:06:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVc-00047m-HG for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVV-0006b0-3n for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:20 -0400 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-197-1MG9P-urMkW8xnvZQx2AKw-1; Thu, 20 May 2021 03:54:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 540FB805738; Thu, 20 May 2021 07:53:37 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0698C6E6FF; Thu, 20 May 2021 07:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497245; 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=DXT56+RtXU8sE6a/uh2xXwfuyUIKgyQGnHPxgWq6b6M=; b=Oz3Qs1AcCCHJWuVatcn4as2KPnYU2Z3P+VOLNuV/k7QFIEan3Vqr7gSDP1/DxYVtYpI4HM rlK5xGwYZE9Y9IPunz7UtbENQySsAMO0bxY9/mQ802v/iFA5g8fEiymtMzbZJTdKUVRje1 /jL4zaOihvSBNIqT3WTdKGuYXUlPNuo= X-MC-Unique: 1MG9P-urMkW8xnvZQx2AKw-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 07/15] qemu-iotests: add gdbserver option to script tests too Date: Thu, 20 May 2021 09:52:28 +0200 Message-Id: <20210520075236.44723-8-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The only limitation here is that running a script with gdbserver will make the test output mismatch with the expected results, making the test fail. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/common.rc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 7f49c9716d..f1d5395ff2 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -166,8 +166,14 @@ _qemu_wrapper() if [ -n "${QEMU_NEED_PID}" ]; then echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid" fi + + GDB=3D"" + if [ ! -z ${GDB_OPTIONS} ]; then + GDB=3D"gdbserver ${GDB_OPTIONS}" + fi + VALGRIND_QEMU=3D"${VALGRIND_QEMU_VM}" _qemu_proc_exec "${VALGRIND_= LOGFILE}" \ - "$QEMU_PROG" $QEMU_OPTIONS "$@" + $GDB "$QEMU_PROG" $QEMU_OPTIONS "$@" ) RETVAL=3D$? _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497576; cv=none; d=zohomail.com; s=zohoarc; b=fTXNybcyXf3rusA8vQSKyRI3XyJVGlfteHyAfZMVDG3zmlEbvsMk4IekF53xHLNXsm0K7VGnuejmAL40LsOvd/f4IbNdlYSJ3eADrFQljWz1gQm4JlsZgRJJxNN7u6JFg7noZRu7VzfiHoWLAxh2cBjTbC66iDr7cAy5nIsos4E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497576; 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=0xWojd96mWY/VkZBzHZKVknxkDCz3xOcY1edOjGqzVs=; b=jEpteDJChIMDOfkOJ02QvaHKRXNnlpxaH2szdIxodzGJ8prJzeprSoQsoAKFRVUMCgdDt5FPMHldvld4m4ppKM1sQSvW7p+dmpMWIuAp5WwedYHpvnR9WM25duxzIpvpuNBlwogKEjdGu2d+yC36dUEjC+GaajMVg2876li4af0= 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+importer2=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 1621497576303801.3150972946764; Thu, 20 May 2021 00:59:36 -0700 (PDT) Received: from localhost ([::1]:52424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdah-00048Z-7y for importer2@patchew.org; Thu, 20 May 2021 03:59:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVJ-0003mI-Nw for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVH-0006TY-Gf for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:01 -0400 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-393-lD17Z8kwMRqND0jt8oaHow-1; Thu, 20 May 2021 03:53:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 199A81034B1C; Thu, 20 May 2021 07:53:40 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2B0C690F3; Thu, 20 May 2021 07:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497238; 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=0xWojd96mWY/VkZBzHZKVknxkDCz3xOcY1edOjGqzVs=; b=OmEtIAyxAFBg9gA4pjHMgKcAFJ0esQVq9U7x6luZA9CXJO19akWKne8NT3dxTDD2EESEgs rSxeZaIXAkqsvWS+mlNZXKy6M3U5KBdSNtf78oU69f2nEW6UCS/xn1TqhErtDPK4osxhmY izykigYjTsFO/IpzvM/JzgL4R8xhkdU= X-MC-Unique: lD17Z8kwMRqND0jt8oaHow-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 08/15] docs/devel/testing: add -gdb option to the debugging section of QEMU iotests Date: Thu, 20 May 2021 09:52:29 +0200 Message-Id: <20210520075236.44723-9-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=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: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 8144e316a4..a746cab745 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -229,6 +229,17 @@ Debugging a test case The following options to the ``check`` script can be useful when debugging a failing test: =20 +* ``-gdb`` wraps every QEMU invocation in a ``gdbserver``, which waits for= a + connection from a gdb client. The options given to ``gdbserver`` (e.g. = the + address on which to listen for connections) are taken from the ``$GDB_OP= TIONS`` + environment variable. By default (if ``$GDB_OPTIONS`` is empty), it lis= tens on + ``localhost:12345``. + It is possible to connect to it for example with + ``gdb -iex "target remote $addr"``, where ``$addr`` is the address + ``gdbserver`` listens on. + If the ``-gdb`` option is not used, ``$GDB_OPTIONS`` is ignored, + regardless on whether it is set or not. + * ``-d`` (debug) just increases the logging verbosity, showing for example the QMP commands and answers. =20 --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621498132; cv=none; d=zohomail.com; s=zohoarc; b=QKxH+PX4sB+DhOoOryFqREwb6+4hJ/2IBMAtU5/gVNeN2fSjin5XBXBB/4Tx8t0kp8XUAxtEenXOFyAQKV2rsTdi+cImBPxXNI3iCAvMzmT6dBKiPuMszpgbZAPXl83hFYOkiUqZ0tYJ/4Zrfjp55+ujJ2wLryCA2oi8ygRzbRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621498132; 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=aRU5Yc+6qMs2aAr3z5aEe9C/LP3NJHxYW8N/l34iSk4=; b=Xf5tbIX6iekdJ2+A5qXlz6vT6eeX9HHq6yAb3fpLSENJM5p78OCopfBextECNv2DPLErQ8IzFqESNbwAaKtbXh+wu4AXdioaJh3vfaGVREq1eDgZ2LvXIC6QwN3nh3Hsd8BVtany3RRL3Wm+7D6W2oT4xVs7xrd8c0eiEa+9LYE= 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+importer2=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 1621498132849264.44865845880304; Thu, 20 May 2021 01:08:52 -0700 (PDT) Received: from localhost ([::1]:48168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdjf-0003nT-Oe for importer2@patchew.org; Thu, 20 May 2021 04:08:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVX-00046G-GH for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVN-0006aj-VX for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:15 -0400 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-144-E2OqlT_7NRCDqVmPbt-7aQ-1; Thu, 20 May 2021 03:54:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A370480574B; Thu, 20 May 2021 07:53:42 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79C926E6FF; Thu, 20 May 2021 07:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497245; 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=aRU5Yc+6qMs2aAr3z5aEe9C/LP3NJHxYW8N/l34iSk4=; b=UquEBgWmNVMbRncaey0Sr54PoZt2o4ubSV2k/jtFmeTj6Vy8YSh6Iuy4LGnxUrB7wOLzB2 73jFTc6fsStp1IKrmLRke2r5R3fzM8jRrW6R47pAkWS+0cQSesjNb1OK6gZL9uxIvoVg2O 7ktN8zIp7U3lVKv3IvoFq7GrA9Sljts= X-MC-Unique: E2OqlT_7NRCDqVmPbt-7aQ-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 09/15] qemu-iotests: extend the check script to support valgrind for python tests Date: Thu, 20 May 2021 09:52:30 +0200 Message-Id: <20210520075236.44723-10-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Currently, the check script only parses the option and sets the VALGRIND_QEMU environmental variable to "y". Add another local python variable that prepares the command line, identical to the one provided in the test scripts. Because the python script does not know in advance the valgring PID to assign to the log file name, use the "%p" flag in valgrind log file name that automatically puts the process PID at runtime. Reviewed-by: Max Reitz Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/check | 7 ++++--- tests/qemu-iotests/iotests.py | 11 +++++++++++ tests/qemu-iotests/testenv.py | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index b9820fdaaf..2101cedfe3 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -36,6 +36,10 @@ def make_argparser() -> argparse.ArgumentParser: p.add_argument('-gdb', action=3D'store_true', help=3D"start gdbserver with $GDB_OPTIONS options \ ('localhost:12345' if $GDB_OPTIONS is empty)") + p.add_argument('-valgrind', action=3D'store_true', + help=3D'use valgrind, sets VALGRIND_QEMU environment ' + 'variable') + p.add_argument('-misalign', action=3D'store_true', help=3D'misalign memory allocations') p.add_argument('--color', choices=3D['on', 'off', 'auto'], @@ -86,9 +90,6 @@ def make_argparser() -> argparse.ArgumentParser: g_bash.add_argument('-o', dest=3D'imgopts', help=3D'options to pass to qemu-img create/convert= , ' 'sets IMGOPTS environment variable') - g_bash.add_argument('-valgrind', action=3D'store_true', - help=3D'use valgrind, sets VALGRIND_QEMU environme= nt ' - 'variable') =20 g_sel =3D p.add_argument_group('test selecting options', 'The following options specify test set ' diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index c9628e6828..41462a80fc 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -97,6 +97,17 @@ sys.stderr.write('Please run this test via the "check" script\n') sys.exit(os.EX_USAGE) =20 +qemu_valgrind =3D [] +if os.environ.get('VALGRIND_QEMU') =3D=3D "y" and \ + os.environ.get('NO_VALGRIND') !=3D "y": + valgrind_logfile =3D "--log-file=3D" + test_dir.strip() + # %p allows to put the valgrind process PID, since + # we don't know it a priori (subprocess.Popen is + # not yet invoked) + valgrind_logfile +=3D "/%p.valgrind" + + qemu_valgrind =3D ['valgrind', valgrind_logfile, '--error-exitcode=3D9= 9'] + socket_scm_helper =3D os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_help= er') =20 luks_default_secret_object =3D 'secret,id=3Dkeysec0,data=3D' + \ diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 49ddd586ef..319d29cb0c 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -282,6 +282,7 @@ def print_env(self) -> None: SOCK_DIR -- {SOCK_DIR} SOCKET_SCM_HELPER -- {SOCKET_SCM_HELPER} GDB_OPTIONS -- {GDB_OPTIONS} +VALGRIND_QEMU -- {VALGRIND_QEMU} """ =20 args =3D collections.defaultdict(str, self.get_env()) --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497765; cv=none; d=zohomail.com; s=zohoarc; b=ffcJ1z9DPiy7AyDlUtAFZ5LnyJXtlxRxj3okBTekjedM+UXRWMlOwwAdC+K5RliEVc+lbixWR96SSjPuBOHUaX3PwBSTkmGxkuOzrnGSBhJLENdz4ScBRaRDP+UUOUzlReEcNTpEc66XGpC1x/EstNoJ/vCP7Lpq24gklr+4SV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497765; 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=BjjmBSyX5i0IsPh5QsO59JCvf1tOo7qIWPnFRSpgVj8=; b=Yynyw6uyKPbmGfiZER+2sAEMCice8ytUBVk4o9AMRdS+M2kxwI+SsZBAsZxle4i1i08eXwXfRFe2+dtWeMSeXzIHH63DPRUZP2CezOPh1YMvmOxIAD/Vwrmr1i9FiRj+6yOCY8V4KosBT0yHh9aKA4VXaQ87pbPNBJmR/2de3Zg= 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+importer2=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 1621497765559964.676458352259; Thu, 20 May 2021 01:02:45 -0700 (PDT) Received: from localhost ([::1]:33942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljddk-0002SD-Hk for importer2@patchew.org; Thu, 20 May 2021 04:02:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVN-0003zI-67 for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVK-0006Wg-Jv for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:04 -0400 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-103-BfAsNFMbOVSceJT-iIvNGQ-1; Thu, 20 May 2021 03:54:00 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1EDCF1014C07; Thu, 20 May 2021 07:53:45 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EBB16E6FF; Thu, 20 May 2021 07:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497242; 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=BjjmBSyX5i0IsPh5QsO59JCvf1tOo7qIWPnFRSpgVj8=; b=cSL0r2Pq5NqOhZVrX/6jeqR0gYfqxkMg8f62nfiywwCBt8A1spHGIK6YzkrxARYOs4mYNV /mWKitzb5y2WWFN/KUppqOtOeTMN4lka0IM2BStKSN5UN6zWvmvaYPm7/n7YRqZLFNVPIZ fOlpzdaLYR3wgyqg5//Xg68YOv2+UHI= X-MC-Unique: BfAsNFMbOVSceJT-iIvNGQ-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 10/15] qemu-iotests: extent QMP socket timeout when using valgrind Date: Thu, 20 May 2021 09:52:31 +0200 Message-Id: <20210520075236.44723-11-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" As with gdbserver, valgrind delays the test execution, so the default QMP socket timeout timeout too soon. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 41462a80fc..5d75094ba6 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -489,12 +489,12 @@ def __init__(self, seconds, errmsg=3D"Timeout"): self.seconds =3D seconds self.errmsg =3D errmsg def __enter__(self): - if not qemu_gdb: + if not (qemu_gdb or qemu_valgrind): signal.signal(signal.SIGALRM, self.timeout) signal.setitimer(signal.ITIMER_REAL, self.seconds) return self def __exit__(self, exc_type, value, traceback): - if not qemu_gdb: + if not (qemu_gdb or qemu_valgrind): signal.setitimer(signal.ITIMER_REAL, 0) return False def timeout(self, signum, frame): @@ -589,7 +589,7 @@ class VM(qtest.QEMUQtestMachine): =20 def __init__(self, path_suffix=3D''): name =3D "qemu%s-%d" % (path_suffix, os.getpid()) - timer =3D 15.0 if not qemu_gdb else None + timer =3D 15.0 if not (qemu_gdb or qemu_valgrind) else None super().__init__(qemu_prog, qemu_opts, wrapper=3Dqemu_gdb, name=3Dname, test_dir=3Dtest_dir, --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621498339; cv=none; d=zohomail.com; s=zohoarc; b=gWrJFdrxtVYsjdbsDKHtarCpYiGR2lO2+Wueaz4PBZkpxpWCHaodnm373vTKKvqwGfImVPGXUepq/yoWYrReqn6WhdTzYYvi9Q+CsPWznwcO65OJgPYPSxVgWHJqWCegnTTu7BrZMJaOf8KokG6eaeCJMLHDMPW5030osaULpzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621498339; 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=L4T7wmyXJeC23Lg3xt19s4bJPCvZpYuudlhCGRu4+QY=; b=B7P/fM2kox2w064H2cUCwUxh2Oa2CGz1pZDROaR/R1aSgubCP7Cg8KcZd3FE/vfbdHTzuCegP1dLAR2asBq69oaq/1dKibBSvjp8bcakMK4GhcNIaXaQ5dOo8FJSFwVNJn7vAUkkAcRPMkpqrQGTK05DpiBtL8pFd/kKOJaABDg= 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+importer2=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 1621498339945553.9283616464782; Thu, 20 May 2021 01:12:19 -0700 (PDT) Received: from localhost ([::1]:55144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdn0-0000Co-Tk for importer2@patchew.org; Thu, 20 May 2021 04:12:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVb-00047c-R4 for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVV-0006bN-3o for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:19 -0400 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-535-NvivMFHTMi6Q6AUx1PTkrw-1; Thu, 20 May 2021 03:54:05 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74AFB81461F; Thu, 20 May 2021 07:53:47 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 746CB6E6FF; Thu, 20 May 2021 07:53:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497247; 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=L4T7wmyXJeC23Lg3xt19s4bJPCvZpYuudlhCGRu4+QY=; b=La/8rIXGn8xpj1KMBSdSkNlYBHGekxMXYyab3+tCjUgzVa92/53ACzVbEB/bXico4XNuhi xI3dLT1YfeHi5uR3BgVqu8YlHYVc6cjf7KHvaQhBuAG4T3ZFA8XM3DUZq3WaFpE9UFP+St BKLEbFPWlDt2XwZWtnLoWe94edg0er4= X-MC-Unique: NvivMFHTMi6Q6AUx1PTkrw-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 11/15] qemu-iotests: allow valgrind to read/delete the generated log file Date: Thu, 20 May 2021 09:52:32 +0200 Message-Id: <20210520075236.44723-12-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When using -valgrind on the script tests, it generates a log file in $TEST_DIR that is either read (if valgrind finds problems) or otherwise deleted. Provide the same exact behavior when using -valgrind on the python tests. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 5d75094ba6..a06284acad 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -597,6 +597,22 @@ def __init__(self, path_suffix=3D''): sock_dir=3Dsock_dir, qmp_timer=3Dtimer) self._num_drives =3D 0 =20 + def subprocess_check_valgrind(self, valgrind: List[str]) -> None: + if not valgrind or not self._popen: + return + + valgrind_filename =3D f"{test_dir}/{self._popen.pid}.valgrind" + + if self.exitcode() =3D=3D 99: + with open(valgrind_filename) as f: + print(f.read()) + else: + os.remove(valgrind_filename) + + def _post_shutdown(self) -> None: + super()._post_shutdown() + self.subprocess_check_valgrind(qemu_valgrind) + def add_object(self, opts): self._args.append('-object') self._args.append(opts) --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497938; cv=none; d=zohomail.com; s=zohoarc; b=OndPvI5Rm4XyDFGxmJydFRbU8L6jw2aAHm9JKGcocbNRgAa7WsGQF3spM8hycs8FbmJOqHn0LUnGdcuFDzIDkotI3F1cfUqpu1P8SWnBxjhzRLOsYqj+CBrlVhjOhx9cxswgCxhjjk1xPaeir3oyyqjtTJ+G1y2mH3XnEW2dNPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497938; 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=zLaq2UTFlof9Ouxq6Ukpg3RYubI5gzhBbbsFmzDG0Fw=; b=Ci+t6i+qcjGvSsrh62V3clRAfuyTTqrWUHOlCC6OxsYiKNHHghhxrmA+Lu+28u8CViXYQUEx9TKj/BUKRPgPcDFzVe5BBDWy8KpQ4mjqTj4N6C2VtFo8WOr4xJib1tacSdBVQL5O6+YJrRchD9+MOOfqLLnmaFafX67G91CXu2c= 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+importer2=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 1621497938588569.7266606766868; Thu, 20 May 2021 01:05:38 -0700 (PDT) Received: from localhost ([::1]:40686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdgX-000764-GX for importer2@patchew.org; Thu, 20 May 2021 04:05:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVX-00046F-7R for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVM-0006aP-Ni for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:14 -0400 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-206-c3qR2DwIPoqHI9CIMlnibw-1; Thu, 20 May 2021 03:54:00 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 23431884DFD; Thu, 20 May 2021 07:53:50 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id D43D569FB1; Thu, 20 May 2021 07:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497244; 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=zLaq2UTFlof9Ouxq6Ukpg3RYubI5gzhBbbsFmzDG0Fw=; b=V4wSdUfyV1ZNZsyhdvan424DOFKpkornMza/khOHQxIOMlPu2cwahAMlyuhMvyVB5XFjSi +9J5sPecz4ZhD1ZPJXa6co3YyUueXuEIlMrP56cjOtfZGR6/c1U59zpE69K5TSx078suln W8UzGeG9iSe6XwbLNITgDlbD8ywuOhY= X-MC-Unique: c3qR2DwIPoqHI9CIMlnibw-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 12/15] qemu-iotests: insert valgrind command line as wrapper for qemu binary Date: Thu, 20 May 2021 09:52:33 +0200 Message-Id: <20210520075236.44723-13-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The priority will be given to gdb command line, meaning if the -gdb parameter and -valgrind are given, gdb will be wrapped around the qemu binary. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index a06284acad..75f1e1711c 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -590,7 +590,8 @@ class VM(qtest.QEMUQtestMachine): def __init__(self, path_suffix=3D''): name =3D "qemu%s-%d" % (path_suffix, os.getpid()) timer =3D 15.0 if not (qemu_gdb or qemu_valgrind) else None - super().__init__(qemu_prog, qemu_opts, wrapper=3Dqemu_gdb, + wrapper =3D qemu_gdb if qemu_gdb else qemu_valgrind + super().__init__(qemu_prog, qemu_opts, wrapper=3Dwrapper, name=3Dname, test_dir=3Dtest_dir, socket_scm_helper=3Dsocket_scm_helper, --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497710; cv=none; d=zohomail.com; s=zohoarc; b=R1jNo9ncMmqwdG5fsDxDQa+0Uz/mJnLejEMWePB9Ycl5rGbSX9SdH1Lo1tGh9+vetr3VjJbE79RAvXCS7D/wv7NfNU0V43sReg4bbLCd7dyC6RuOfkJ2HUH61n1ehLSBR4QKtpBWtPvWA7oZjEkcvVwZxTwNAxqLL0negMe6K8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497710; 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=CjsoMbRhYAxpyuqnQy+wGpmp1y5VV1L43Bi/u6vJGwM=; b=jrSZQzRSglwZUfE3cpJrGRD1TWIEz7UrurLoRlpi7C6vImcwmFbTPag81lFdKcTy0Psk4ISCwuk12WHFtjZfQmMdNtGiJkeoemDyEjF84thym4l5jchRlygchdBbjp5otmsKows4esU6LlJrBEj9z8seAkMJcF74uJjSYdvltlI= 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+importer2=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 1621497710088781.7377419873665; Thu, 20 May 2021 01:01:50 -0700 (PDT) Received: from localhost ([::1]:60508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdcr-0001IN-0T for importer2@patchew.org; Thu, 20 May 2021 04:01:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVO-00043m-Cq for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVM-0006Z8-DV for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:06 -0400 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-394-P6H5hfGaPOef6di93jks0g-1; Thu, 20 May 2021 03:54:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 962AB8EF9E3; Thu, 20 May 2021 07:53:52 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 821326E709; Thu, 20 May 2021 07:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497243; 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=CjsoMbRhYAxpyuqnQy+wGpmp1y5VV1L43Bi/u6vJGwM=; b=aeWtAl4e6lTJdPNMRMVHT7V1xDIrF+hsJYOhqfLd8Hq7c/DVesfb9J9Y+H172oVw35c9WA b21yhKMDbghTNa5fhVVRJqobVsMp68apGodmqSm6anCVc/V7p8YnrlsC6qGn0rvpQEkk89 9dUCva10qNY/kR5lUrneTnjaPbp2KHs= X-MC-Unique: P6H5hfGaPOef6di93jks0g-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 13/15] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests Date: Thu, 20 May 2021 09:52:34 +0200 Message-Id: <20210520075236.44723-14-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Reviewed-by: Max Reitz Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index a746cab745..d743e88746 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -240,6 +240,13 @@ a failing test: If the ``-gdb`` option is not used, ``$GDB_OPTIONS`` is ignored, regardless on whether it is set or not. =20 +* ``-valgrind`` attaches a valgrind instance to QEMU. If it detects + warnings, it will print and save the log in + ``$TEST_DIR/.valgrind``. + The final command line will be ``valgrind --log-file=3D$TEST_DIR/ + .valgrind --error-exitcode=3D99 $QEMU ...`` + Note: if used together with ``-gdb``, this command will be ignored. + * ``-d`` (debug) just increases the logging verbosity, showing for example the QMP commands and answers. =20 --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497591; cv=none; d=zohomail.com; s=zohoarc; b=BNwCNtHLGqy/t4f8fHZ6XutLPB3Au8SaqfQVzgsRxqq4IBo7iO3K+ZjIoUjI1fzKg8+bEelcgTgSdoIamb807v4CzcBNHUF4wdVts3RDhMcf2pAUhUTmpv9o8lab/tDqY5Q263laUYR4+pkHt2yFcEKg81mUX6pWE4gX1AY4Db4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497591; 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=TCP7F+eP023nKfejrg+KZvYtdvpma2dSNHK5/lE9Bjw=; b=TJyocekR5dCVKSvra1f7600icKXvRVd4Y/ghs6zFOB6OhLKVk+blzyHsIBPavbf34e/+VNlrYoMIqf59bgqic/CtBsF66ybpUvBskxA9d81Q1dH6x/HlfRMPzSaLK3TvnJL56cG4ZmDaqSUjsnkMuH3sadVkcwmA5ZYrXCzzyVg= 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+importer2=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 1621497591853405.2410110754256; Thu, 20 May 2021 00:59:51 -0700 (PDT) Received: from localhost ([::1]:53972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdaw-0005Dl-OJ for importer2@patchew.org; Thu, 20 May 2021 03:59:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVb-000478-1k for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVQ-0006bH-Jj for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:18 -0400 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-338-0MwvWT2vNwGOKScGRtsOIg-1; Thu, 20 May 2021 03:54:05 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4078D107AD39; Thu, 20 May 2021 07:53:55 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1A076E6FF; Thu, 20 May 2021 07:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497246; 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=TCP7F+eP023nKfejrg+KZvYtdvpma2dSNHK5/lE9Bjw=; b=TxaBYIt3OyVO6A3HmYpOigSpzcuwBX9DiC6o6zco7XFN0x9Kpv0wdn3M0+i5oQCkEK6P2O QaE60fJEwNln1qYm46Ghe46i9ccRBiREnG5+pC51jcah8hdQ6hWuNZ6ltmhQ4yl0fDlr+A iLwi0wmy4UquGpeYUxa2t6hmhI0H9Bg= X-MC-Unique: 0MwvWT2vNwGOKScGRtsOIg-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 14/15] qemu-iotests: add option to show qemu binary logs on stdout Date: Thu, 20 May 2021 09:52:35 +0200 Message-Id: <20210520075236.44723-15-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Using the flag -p, allow the qemu binary to print to stdout. Reviewed-by: Max Reitz Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/check | 4 +++- tests/qemu-iotests/iotests.py | 9 +++++++++ tests/qemu-iotests/testenv.py | 9 +++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 2101cedfe3..51b90681ab 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -33,6 +33,8 @@ def make_argparser() -> argparse.ArgumentParser: help=3D'pretty print output for make check') =20 p.add_argument('-d', dest=3D'debug', action=3D'store_true', help=3D'de= bug') + p.add_argument('-p', dest=3D'print', action=3D'store_true', + help=3D'redirects qemu\'s stdout and stderr to the test ou= tput') p.add_argument('-gdb', action=3D'store_true', help=3D"start gdbserver with $GDB_OPTIONS options \ ('localhost:12345' if $GDB_OPTIONS is empty)") @@ -117,7 +119,7 @@ if __name__ =3D=3D '__main__': aiomode=3Dargs.aiomode, cachemode=3Dargs.cachemode, imgopts=3Dargs.imgopts, misalign=3Dargs.misalign, debug=3Dargs.debug, valgrind=3Dargs.valgrind, - gdb=3Dargs.gdb) + gdb=3Dargs.gdb, qprint=3Dargs.print) =20 testfinder =3D TestFinder(test_dir=3Denv.source_iotests) =20 diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 75f1e1711c..53a3916a91 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -80,6 +80,8 @@ if gdb_qemu_env: qemu_gdb =3D ['gdbserver'] + gdb_qemu_env.strip().split(' ') =20 +qemu_print =3D os.environ.get('PRINT_QEMU', False) + imgfmt =3D os.environ.get('IMGFMT', 'raw') imgproto =3D os.environ.get('IMGPROTO', 'file') output_dir =3D os.environ.get('OUTPUT_DIR', '.') @@ -614,6 +616,13 @@ def _post_shutdown(self) -> None: super()._post_shutdown() self.subprocess_check_valgrind(qemu_valgrind) =20 + def _pre_launch(self) -> None: + super()._pre_launch() + if qemu_print and self._qemu_log_file is not None: + # set QEMU binary output to stdout + self._qemu_log_file.close() + self._qemu_log_file =3D None + def add_object(self, opts): self._args.append('-object') self._args.append(opts) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 319d29cb0c..b79ce22fe9 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -74,7 +74,7 @@ class TestEnv(ContextManager['TestEnv']): 'AIOMODE', 'CACHEMODE', 'VALGRIND_QEMU', 'CACHEMODE_IS_DEFAULT', 'IMGFMT_GENERIC', 'IMGOPTSSYN= TAX', 'IMGKEYSECRET', 'QEMU_DEFAULT_MACHINE', 'MALLOC_PERTU= RB_', - 'GDB_OPTIONS'] + 'GDB_OPTIONS', 'PRINT_QEMU'] =20 def get_env(self) -> Dict[str, str]: env =3D {} @@ -166,7 +166,8 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, misalign: bool =3D False, debug: bool =3D False, valgrind: bool =3D False, - gdb: bool =3D False) -> None: + gdb: bool =3D False, + qprint: bool =3D False) -> None: self.imgfmt =3D imgfmt self.imgproto =3D imgproto self.aiomode =3D aiomode @@ -174,6 +175,9 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, self.misalign =3D misalign self.debug =3D debug =20 + if qprint: + self.print_qemu =3D 'y' + if gdb: self.gdb_options =3D os.environ.get('GDB_OPTIONS', DEF_GDB_OPT= IONS) if not self.gdb_options: @@ -283,6 +287,7 @@ def print_env(self) -> None: SOCKET_SCM_HELPER -- {SOCKET_SCM_HELPER} GDB_OPTIONS -- {GDB_OPTIONS} VALGRIND_QEMU -- {VALGRIND_QEMU} +PRINT_QEMU_OUTPUT -- {PRINT_QEMU} """ =20 args =3D collections.defaultdict(str, self.get_env()) --=20 2.30.2 From nobody Mon May 6 07:22:31 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621497883; cv=none; d=zohomail.com; s=zohoarc; b=LBotes8MFKrKT3CrB1NVrcPPpCAzPcZYpohxg0O0LOuKzCeOnxuUgnc6GACbe8gMWHHSlfAJhu8bYugVx6RR0gcnDKxRm2ZnMMm+jBmWUYYO0GR91d6Djpr0C6q/BKyLwDKJvUtwLg+B+WD8C4OVYvuCAimYhpKvXEcMweowkgo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621497883; 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=oHk2yVImEAFBWS0/dh+Cbucp+g1oHQMH8Zag+zRQ0X4=; b=XMTdkGDisqmfREvr8olkV0rEAjoiA4ZvHJg64RGtPyz6P/GSxpzJ7SsNFdBze+fKKdra3H04JVQxBurbLlWgAMxtjqwCjTQh0FtB4rG+jUHWQcIEOoJqQnEwph2z4HFvrRkmQpKJRn6/cMY1KaZbceIDtuQhnA4K6dNs4JGg424= 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+importer2=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 1621497883387788.6162584588072; Thu, 20 May 2021 01:04:43 -0700 (PDT) Received: from localhost ([::1]:37938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljdfe-0005GE-0z for importer2@patchew.org; Thu, 20 May 2021 04:04:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVY-00046J-QS for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljdVN-0006aY-OB for qemu-devel@nongnu.org; Thu, 20 May 2021 03:54:16 -0400 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-426-5PnS_yNxNdS9zxCuX0ulHw-1; Thu, 20 May 2021 03:54:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2F248EF9EA; Thu, 20 May 2021 07:53:57 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id A01156E6FF; Thu, 20 May 2021 07:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621497244; 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=oHk2yVImEAFBWS0/dh+Cbucp+g1oHQMH8Zag+zRQ0X4=; b=cqsmMsV4ieDaPgixfy5D5NPtnjRgCd8IbUQvHPxN5oMC2ZfJ/dLiejzq/SMhXf6hPd5zNP JdNDupE5jBLNnGxDqqAv3PepXvAmPvAmr8Lk7HLNsLPndhP2YI6V8817IFpa8giH0EM4o1 TvBS2/qQbZ/vlSTtn5tiO67Xhdp2+tE= X-MC-Unique: 5PnS_yNxNdS9zxCuX0ulHw-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Subject: [PATCH v4 15/15] docs/devel/testing: add -p option to the debug section of QEMU iotests Date: Thu, 20 May 2021 09:52:36 +0200 Message-Id: <20210520075236.44723-16-eesposit@redhat.com> In-Reply-To: <20210520075236.44723-1-eesposit@redhat.com> References: <20210520075236.44723-1-eesposit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Emanuele Giuseppe Esposito , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index d743e88746..1192d6489e 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -250,6 +250,10 @@ a failing test: * ``-d`` (debug) just increases the logging verbosity, showing for example the QMP commands and answers. =20 +* ``-p`` (print) redirect QEMU=E2=80=99s stdout and stderr to the test out= put, + instead of saving it into a log file in + ``$TEST_DIR/qemu-machine-``. + Test case groups ---------------- =20 --=20 2.30.2