From nobody Wed May 14 13:13:00 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523457798215678.9079307499824; Wed, 11 Apr 2018 07:43:18 -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 D42FE3133E60; Wed, 11 Apr 2018 14:43:16 +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 A15317E6A8; Wed, 11 Apr 2018 14:43: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 6B83E181BA0E; Wed, 11 Apr 2018 14:43:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3BEgGMi008853 for ; Wed, 11 Apr 2018 10:42:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 67B6B2026E0E; Wed, 11 Apr 2018 14:42:16 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B7D7202698A for ; Wed, 11 Apr 2018 14:42:16 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id D5D75100B87; Wed, 11 Apr 2018 16:42:10 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 11 Apr 2018 16:41:40 +0200 Message-Id: <64a9df48900f1b603fdba1c477b0a615fe2f629b.1523456480.git.jdenemar@redhat.com> In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 50/73] qemumonitorjsontest: Drop migration params test 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: , MIME-Version: 1.0 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.46]); Wed, 11 Apr 2018 14:43:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The test is mostly useless and we want to refactor migration parameters even further. The refactoring will allow us to introduce enhanced tests for migration parameters. Signed-off-by: Jiri Denemark Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemumonitorjsontest.c | 99 ------------------------------------- 1 file changed, 99 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 8a5b0be64b..dafcccebad 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1787,104 +1787,6 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockStatsInfo= (const void *data) return ret; } =20 -static int -testQemuMonitorJSONqemuMonitorJSONGetMigrationParams(const void *data) -{ - virDomainXMLOptionPtr xmlopt =3D (virDomainXMLOptionPtr)data; - qemuMonitorTestPtr test =3D qemuMonitorTestNewSimple(true, xmlopt); - qemuMonitorMigrationParams params; - int ret =3D -1; - - if (!test) - return -1; - - if (qemuMonitorTestAddItem(test, "query-migrate-parameters", - "{" - " \"return\": {" - " \"decompress-threads\": 2," - " \"cpu-throttle-increment\": 10," - " \"compress-threads\": 8," - " \"compress-level\": 1," - " \"cpu-throttle-initial\": 20," - " \"tls-creds\": \"tls0\"," - " \"tls-hostname\": \"\"," - " \"max-bandwidth\": 1234567890," - " \"downtime-limit\": 500," - " \"block-incremental\": true," - " \"xbzrle-cache-size\": 67108864" - " }" - "}") < 0) { - goto cleanup; - } - - if (qemuMonitorJSONGetMigrationParams(qemuMonitorTestGetMonitor(test), - ¶ms) < 0) - goto cleanup; - -#define CHECK_NUM(VAR, FIELD, VALUE, FMT) \ - do { \ - if (!params.VAR ## _set) { \ - virReportError(VIR_ERR_INTERNAL_ERROR, "%s is not set", FIELD)= ; \ - goto cleanup; \ - } \ - if (params.VAR !=3D VALUE) { \ - virReportError(VIR_ERR_INTERNAL_ERROR, \ - "Invalid %s: " FMT ", expected " FMT, \ - FIELD, params.VAR, VALUE); \ - goto cleanup; \ - } \ - } while (0) - -#define CHECK_INT(VAR, FIELD, VALUE) \ - CHECK_NUM(VAR, FIELD, VALUE, "%d") - -#define CHECK_ULONG(VAR, FIELD, VALUE) \ - CHECK_NUM(VAR, FIELD, VALUE, "%llu") - -#define CHECK_BOOL(VAR, FIELD, VALUE) \ - CHECK_NUM(VAR, FIELD, VALUE, "%d") - -#define CHECK_STR(VAR, FIELD, VALUE) \ - do { \ - if (!params.VAR) { \ - virReportError(VIR_ERR_INTERNAL_ERROR, "%s is not set", FIELD)= ; \ - goto cleanup; \ - } \ - if (STRNEQ(params.VAR, VALUE)) { \ - virReportError(VIR_ERR_INTERNAL_ERROR, \ - "Invalid %s:'%s', expected '%s'", \ - FIELD, params.VAR, VALUE); \ - goto cleanup; \ - } \ - } while (0) - - CHECK_INT(compressLevel, "compress-level", 1); - CHECK_INT(compressThreads, "compress-threads", 8); - CHECK_INT(decompressThreads, "decompress-threads", 2); - CHECK_INT(cpuThrottleInitial, "cpu-throttle-initial", 20); - CHECK_INT(cpuThrottleIncrement, "cpu-throttle-increment", 10); - CHECK_STR(tlsCreds, "tls-creds", "tls0"); - CHECK_STR(tlsHostname, "tls-hostname", ""); - CHECK_ULONG(maxBandwidth, "max-bandwidth", 1234567890ULL); - CHECK_ULONG(downtimeLimit, "downtime-limit", 500ULL); - CHECK_BOOL(blockIncremental, "block-incremental", true); - CHECK_ULONG(xbzrleCacheSize, "xbzrle-cache-size", 67108864ULL); - -#undef CHECK_NUM -#undef CHECK_INT -#undef CHECK_ULONG -#undef CHECK_BOOL -#undef CHECK_STR - - ret =3D 0; - - cleanup: - VIR_FREE(params.tlsCreds); - VIR_FREE(params.tlsHostname); - qemuMonitorTestFree(test); - return ret; -} - =20 static int testQemuMonitorJSONqemuMonitorJSONGetMigrationCacheSize(const void *data) @@ -3002,7 +2904,6 @@ mymain(void) DO_TEST(qemuMonitorJSONGetBlockInfo); DO_TEST(qemuMonitorJSONGetBlockStatsInfo); DO_TEST(qemuMonitorJSONGetMigrationCacheSize); - DO_TEST(qemuMonitorJSONGetMigrationParams); DO_TEST(qemuMonitorJSONGetMigrationStats); DO_TEST(qemuMonitorJSONGetChardevInfo); DO_TEST(qemuMonitorJSONSetBlockIoThrottle); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list