From nobody Sun Dec 22 01:16:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1685027799; cv=none; d=zohomail.com; s=zohoarc; b=XiT3krxdly2UAMTyC5y1ABW8AW0HHu2xBQpZgyKBytHruZwa48ejtLDIQeJKyn0tpocaQ1jx9jfI4kZhkH/kX3ujY6PwM5gqtk+g4cjHEbAKBBj5nHkKwl/QAGvEmb6ED/dmWocUCBJdduOvQcQR4xfvhdQsohSmETtq/+tI00s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685027799; 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; bh=f2vYcBkKDJGkaoQ/+nSYgud9aoPMH8fYIodWgpmpVRg=; b=CKbmbFuwLMgyhioQiXfqRId6RW87f4vSP16/hvhlbEZAfyv7mfYoCkhKNnJ1LdvzetlyEv1cOrfBMiwFDvlkazHsBPkbTWNvovpzKxS5KjN38sklwbjR429qFC8ekTBcN7f2kENEvXDJN9E4xn/WmKYJ5Z3VChDPvhhXAUNPkJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1685027799029311.2125047981134; Thu, 25 May 2023 08:16:39 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-638-XahQdwu2Mp6TnbdAyoEzhQ-1; Thu, 25 May 2023 11:16:32 -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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 139EF1C01729; Thu, 25 May 2023 15:16:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id F10E12023190; Thu, 25 May 2023 15:16:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5630A19465BA; Thu, 25 May 2023 15:16:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0BC971946A44 for ; Thu, 25 May 2023 15:14:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C23D840D1CF; Thu, 25 May 2023 15:13:55 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C1F2482062 for ; Thu, 25 May 2023 15:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685027798; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=f2vYcBkKDJGkaoQ/+nSYgud9aoPMH8fYIodWgpmpVRg=; b=MndVm+JpAzKnJqzg3QNDUpbuMOl3LKC7vS3aUl4e6jIHw64nJO5LmvpYOCm0Npk2d21WL4 mSnBYHzKUbisAWNmlJKHbGM94vDhTAGKPy8hasYCULhGffPiCYsDg4VwdFwB2Caz+GlfTp QnuggnAgQzBK3HCF9vGYvmTp40xotc4= X-MC-Unique: XahQdwu2Mp6TnbdAyoEzhQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/18] testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle: Rewrite using qemuMonitorTestAddItemVerbatim Date: Thu, 25 May 2023 17:13:37 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685027800354100001 Content-Type: text/plain; charset="utf-8" Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemumonitorjsontest.c | 49 +++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index ceb7108ac0..d9323d94c3 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1865,25 +1865,36 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottl= e(const void *opaque) expectedInfo =3D (virDomainBlockIoTuneInfo) {1, 2, 3, 4, 5, 6, 7, 8, 9= , 10, 11, 12, 13, NULL, 15, 16, 17, 18, 19, 20}; expectedInfo.group_name =3D g_strdup("group14"); - if (qemuMonitorTestAddItem(test, "query-block", queryBlockReply) < 0 || - qemuMonitorTestAddItemParams(test, "block_set_io_throttle", - "{\"return\":{}}", - "device", "\"drive-virtio-disk1\"", - "bps", "1", "bps_rd", "2", "bps_wr", = "3", - "iops", "4", "iops_rd", "5", "iops_wr= ", "6", - "bps_max", "7", "bps_rd_max", "8", - "bps_wr_max", "9", - "iops_max", "10", "iops_rd_max", "11", - "iops_wr_max", "12", "iops_size", "13= ", - "group", "\"group14\"", - "bps_max_length", "15", - "bps_rd_max_length", "16", - "bps_wr_max_length", "17", - "iops_max_length", "18", - "iops_rd_max_length", "19", - "iops_wr_max_length", "20", - NULL, NULL) < 0) - goto cleanup; + if (qemuMonitorTestAddItem(test, "query-block", queryBlockReply) < 0) + return -1; + + if (qemuMonitorTestAddItemVerbatim(test, + "{\"execute\":\"block_set_io_thrott= le\"," + " \"arguments\":{\"device\": \"driv= e-virtio-disk1\"," + " \"bps\": 1," + " \"bps_rd\": 2," + " \"bps_wr\": 3," + " \"iops\": 4," + " \"iops_rd\": 5," + " \"iops_wr\": 6," + " \"bps_max\": 7," + " \"bps_rd_max\": 8," + " \"bps_wr_max\": 9," + " \"iops_max\": 10," + " \"iops_rd_max\": 1= 1," + " \"iops_wr_max\": 1= 2," + " \"iops_size\": 13," + " \"group\": \"group= 14\"," + " \"bps_max_length\"= : 15," + " \"bps_rd_max_lengt= h\": 16," + " \"bps_wr_max_lengt= h\": 17," + " \"iops_max_length\= ": 18," + " \"iops_rd_max_leng= th\": 19," + " \"iops_wr_max_leng= th\": 20}," + " \"id\":\"libvirt-2\"}", + NULL, + "{ \"return\" : {}}") < 0) + return -1; if (qemuMonitorJSONGetBlockIoThrottle(qemuMonitorTestGetMonitor(test), "drive-virtio-disk0", NULL, &inf= o) < 0) --=20 2.40.1