From nobody Tue Feb 10 05:50:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1521814259656279.53940709516087; Fri, 23 Mar 2018 07:10:59 -0700 (PDT) Received: from localhost ([::1]:38237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezNPD-0000S8-R6 for importer@patchew.org; Fri, 23 Mar 2018 10:10:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezNNd-0007OB-A6 for qemu-devel@nongnu.org; Fri, 23 Mar 2018 10:09:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezNNY-0005DM-Uc for qemu-devel@nongnu.org; Fri, 23 Mar 2018 10:09:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35866 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ezNNY-0005D2-PL for qemu-devel@nongnu.org; Fri, 23 Mar 2018 10:09:12 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E357722D3; Fri, 23 Mar 2018 14:09:12 +0000 (UTC) Received: from xz-mi.redhat.com (ovpn-12-68.pek2.redhat.com [10.72.12.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 51EAE2023233; Fri, 23 Mar 2018 14:09:02 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 23 Mar 2018 22:08:19 +0800 Message-Id: <20180323140821.28957-3-peterx@redhat.com> In-Reply-To: <20180323140821.28957-1-peterx@redhat.com> References: <20180323140821.28957-1-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 23 Mar 2018 14:09:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 23 Mar 2018 14:09:12 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'peterx@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH for-2.12 2/4] Revert "tests: qmp-test: add oob test" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Fam Zheng , Eric Auger , John Snow , peterx@redhat.com, Max Reitz , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This reverts commit d003f7a8f9cafe50119975844fa01afc2baf41fb. Signed-off-by: Peter Xu --- tests/qmp-test.c | 65 ----------------------------------------------------= ---- 1 file changed, 65 deletions(-) diff --git a/tests/qmp-test.c b/tests/qmp-test.c index 07c0b87e27..2e4b599a4c 100644 --- a/tests/qmp-test.c +++ b/tests/qmp-test.c @@ -164,70 +164,6 @@ static void test_qmp_protocol(void) qtest_quit(qts); } =20 -/* Tests for Out-Of-Band support. */ -static void test_qmp_oob(void) -{ - QDict *resp; - int acks =3D 0; - const char *cmd_id; - - global_qtest =3D qtest_init_without_qmp_handshake(common_args); - - /* Ignore the greeting message. */ - resp =3D qmp_receive(); - g_assert(qdict_get_qdict(resp, "QMP")); - QDECREF(resp); - - /* Try a fake capability, it should fail. */ - resp =3D qmp("{ 'execute': 'qmp_capabilities', " - " 'arguments': { 'enable': [ 'cap-does-not-exist' ] } }"); - g_assert(qdict_haskey(resp, "error")); - QDECREF(resp); - - /* Now, enable OOB in current QMP session, it should succeed. */ - resp =3D qmp("{ 'execute': 'qmp_capabilities', " - " 'arguments': { 'enable': [ 'oob' ] } }"); - g_assert(qdict_haskey(resp, "return")); - QDECREF(resp); - - /* - * Try any command that does not support OOB but with OOB flag. We - * should get failure. - */ - resp =3D qmp("{ 'execute': 'query-cpus'," - " 'control': { 'run-oob': true } }"); - g_assert(qdict_haskey(resp, "error")); - QDECREF(resp); - - /* - * First send the "x-oob-test" command with lock=3Dtrue and - * oob=3Dfalse, it should hang the dispatcher and main thread; - * later, we send another lock=3Dfalse with oob=3Dtrue to continue - * that thread processing. Finally we should receive replies from - * both commands. - */ - qmp_async("{ 'execute': 'x-oob-test'," - " 'arguments': { 'lock': true }, " - " 'id': 'lock-cmd'}"); - qmp_async("{ 'execute': 'x-oob-test', " - " 'arguments': { 'lock': false }, " - " 'control': { 'run-oob': true }, " - " 'id': 'unlock-cmd' }"); - - /* Ignore all events. Wait for 2 acks */ - while (acks < 2) { - resp =3D qmp_receive(); - cmd_id =3D qdict_get_str(resp, "id"); - if (!g_strcmp0(cmd_id, "lock-cmd") || - !g_strcmp0(cmd_id, "unlock-cmd")) { - acks++; - } - QDECREF(resp); - } - - qtest_end(); -} - static int query_error_class(const char *cmd) { static struct { @@ -412,7 +348,6 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); =20 qtest_add_func("qmp/protocol", test_qmp_protocol); - qtest_add_func("qmp/oob", test_qmp_oob); qmp_schema_init(&schema); add_query_tests(&schema); =20 --=20 2.14.3