From nobody Sun Apr 28 12:44:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560977045; cv=none; d=zoho.com; s=zohoarc; b=Een9I8qA70+EYG7c13EudtYtBWMeYLfdk0GxnR24YqO6LJbVm+CW9aR9fEpcgBwjFUGbm0cr8j0mqy54gVkPSbHHFBcEjw0y0xamaa/LPEJZNilspuzgRECO8Mx6BKOhUHp3ZIcbcPmjIbLQwKdl8hW/jBy/85cirAPw5TD1LqY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560977045; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=VSXwMVcWJJqFPQXo8tj6+uxvGXahxgXjxaq2Zg+PAec=; b=od3OpXWKjl9kxW00JhDGz+AXvbsDeeSc5n5jI/NBwzqir0kTMBUPeqPrijJZ6jHAqGDon6BlOdiyfwvYYM2K0FyAOJFnfqcnF8aFXiIChMZNC9FlNC1IJVLg+jIqnkThFc6ood2Ngp11Z707fgoGrHiRydx/y2jNqhIOxMii8tQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156097704567720.01903989888592; Wed, 19 Jun 2019 13:44:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B8983154846; Wed, 19 Jun 2019 20:43:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D317A19722; Wed, 19 Jun 2019 20:43:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8F9F41806B19; Wed, 19 Jun 2019 20:43:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5JKhkEB000584 for ; Wed, 19 Jun 2019 16:43:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id DDF7D5C221; Wed, 19 Jun 2019 20:43:46 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 681475C207 for ; Wed, 19 Jun 2019 20:43:46 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 22:43:39 +0200 Message-Id: <27e6addd6379912a521573296f0dcd5ed134a108.1560976988.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] tests: assume JSON in qemuMonitorTestIO X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 19 Jun 2019 20:43:59 +0000 (UTC) The QMP monitor only uses a newline to separate lines, while HMP and the guest agent also use a carriage return. In preparation to dropping support for testing HMP interaction, only skip the carriage return if we're dealing with the guest agent, removing the need to check the 'json' field. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Andrea Bolognani --- tests/qemumonitortestutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 85a2fca659..b29c6d0f53 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -296,7 +296,7 @@ qemuMonitorTestIO(virNetSocketPtr sock, */ t1 =3D test->incoming; while ((t2 =3D strstr(t1, "\n")) || - (!test->json && (t2 =3D strstr(t1, "\r")))) { + (test->agent && (t2 =3D strstr(t1, "\r")))) { *t2 =3D '\0'; =20 if (qemuMonitorTestProcessCommand(test, t1) < 0) { --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 12:44:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560977047; cv=none; d=zoho.com; s=zohoarc; b=Cb4tBN9DJyYkicZ5OXaP9HsO/op9Lv1QgFpew8HThUhLMG3SPNeV87v8KklfVlWEe6DPzLUFwbbI7uxF72AMKJLnYDMZImwVAPWV/WvNRto8Ly68nXqu2CDcupgExSvmDRKBatn2L129GgjLI50J0hRUb0QH5rAYAYZLUj4WrPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560977047; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=3J22+PKhMxM89mTWKhZFn2Jo+8E8n7kK3Cf2blhPebk=; b=Llkb8wScBbpJl7zACPe/PBStmn8/rVkjCz8Ad7ia11lr/ut/fbO0IRjpNCOoYL1E95Lu4DqB1Le9e2WAPsgnA8wG3lIfYfKiAjTSMh4c3qqa9STvCq5Dho//aHeX3WaurycMMCygWkMMpYfV4h9AzddsUP82gkIX1NiTHwxqkAk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560977047419652.3735441839569; Wed, 19 Jun 2019 13:44:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D83A7EBDC; Wed, 19 Jun 2019 20:44:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 621505C221; Wed, 19 Jun 2019 20:44:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 193821806B1E; Wed, 19 Jun 2019 20:44:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5JKhlp6000592 for ; Wed, 19 Jun 2019 16:43:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id A9EB25C221; Wed, 19 Jun 2019 20:43:47 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35E955C207 for ; Wed, 19 Jun 2019 20:43:47 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 22:43:40 +0200 Message-Id: <83524a05d1242f19e627730eca25d5d242b58f07.1560976988.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] tests: qemuMonitorTestProcessCommandDefaultValidate: simplify condition X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 19 Jun 2019 20:44:05 +0000 (UTC) We return success when running this function for either non-JSON monitor testing or guest agent testing. However we no longer test HMP monitor and we do not try to validate the guest agent interaction. Drop the test->json check and report a proper error if someone tries to run this function for the guest agent without properly wiring it up. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Andrea Bolognani --- tests/qemumonitortestutils.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index b29c6d0f53..9f18e511ac 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -521,9 +521,16 @@ qemuMonitorTestProcessCommandDefaultValidate(qemuMonit= orTestPtr test, VIR_AUTOPTR(virJSONValue) emptyargs =3D NULL; VIR_AUTOFREE(char *) schemapath =3D NULL; =20 - if (!test->qapischema || !test->json || test->agent) + if (!test->qapischema) return 0; =20 + if (test->agent) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + "Command validation testing is not " + "implemented for the guest agent"); + return -1; + } + /* 'device_add' needs to be skipped as it does not have fully defined = schema */ if (STREQ(cmdname, "device_add")) return 0; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 12:44:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560977058; cv=none; d=zoho.com; s=zohoarc; b=kJVIEI6Nzu6geMop1WYhsBsIch14joPFQvyg28gq8uGZdZUDH9MzSIVd8VRIuYtsO8MTK8fDKjhraDl40vVZz5ydkz9tzre6N7jv6yw5COxH73t3xkCYEQz/ig+AMVAqoBCOzwjf+f8gYdwiFePgz8h8jdJRlfNVtibp+KCs6zQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560977058; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=zjrjdK7Tj6xI9arw49g+H95bjh3nxRaLfaKej4A9pAE=; b=AkyXAzu+C7GDwzaK9FnifCWxSgEhSpyt0N3jzCuVQ723cOU9sQoQ5n49PodQFH+ZCXYS9Gv0v6WG4A9aNR8QqdhMmWjbAkZ+11qntwngK25YPOIc2hV+S6+KupcK90Io98iVr8TJQK9jETSXQjIDW+RpsnbfmmdySc18RzrPyr0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560977058879239.92176503401095; Wed, 19 Jun 2019 13:44:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E2D3F74AE; Wed, 19 Jun 2019 20:44:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 270AE61090; Wed, 19 Jun 2019 20:44:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CBF57206D2; Wed, 19 Jun 2019 20:44:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5JKhmE6000603 for ; Wed, 19 Jun 2019 16:43:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 75AB55C221; Wed, 19 Jun 2019 20:43:48 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 015F75C207 for ; Wed, 19 Jun 2019 20:43:47 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 22:43:41 +0200 Message-Id: <2912877ce167e7be59b44b231c0f5ab00a3eee2c.1560976988.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] tests: qemuMonitorTest: drop the JSON field X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 19 Jun 2019 20:44:17 +0000 (UTC) Now that we no longer support testing HMP monitor, the json field is pointless. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Andrea Bolognani --- tests/qemumonitortestutils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 9f18e511ac..d395a9b539 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -51,7 +51,6 @@ struct _qemuMonitorTest { virMutex lock; virThread thread; =20 - bool json; bool quit; bool running; bool started; @@ -1189,7 +1188,6 @@ qemuMonitorTestNew(virDomainXMLOptionPtr xmlopt, if (!(test =3D qemuMonitorCommonTestNew(xmlopt, vm, &src))) goto error; =20 - test->json =3D true; test->qapischema =3D schema; if (!(test->mon =3D qemuMonitorOpen(test->vm, &src, --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list