From nobody Mon Feb 9 00:30:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1698234070; cv=none; d=zohomail.com; s=zohoarc; b=dgwaxRFwSEeD7XDhLUhDTsHfm/USMQp2E9DROOzhtt2F7BzKQnL/llhXKLr9nXDi2kSaLmn3FysEzxDk+fYzeTK0a2RulT+l5rX3jn18fKPxhA3QHp5jHwzzbH9Tm2lYI0aFlBp/vgsUaT8CkvS6XaUpCkr0gBoq8KZlTpK7pC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698234070; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=nfVdSSDrAxi24nws2n5CkqyvhIesQZqlR0i9CpjYdbU=; b=DnkV8UxdE8UthX7qmTCPM3yU+1qzvGrdqvh/Ve8oaqpvC2YBOHEAfJI6oGMmz90FavWtcaEFXr7B3O1rSW+IkDuuBp5/ZXbicBzEUrwLlMujgJh0HP7V0H/0peocjuNaNPiW9HO4uROKxma6LcD8MIr4WiwHJAlCmpYhHkjer2w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1698234070266498.1526242545625; Wed, 25 Oct 2023 04:41:10 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-317-X4bPhDz8MgGyMLq7gVJLTg-1; Wed, 25 Oct 2023 07:40:15 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5270A84B117; Wed, 25 Oct 2023 11:39:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39E362026D6E; Wed, 25 Oct 2023 11:39:55 +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 1B3B91946595; Wed, 25 Oct 2023 11:39:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 839D31946586 for ; Wed, 25 Oct 2023 11:39:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6534F492BFC; Wed, 25 Oct 2023 11:39:53 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4A89492BFA for ; Wed, 25 Oct 2023 11:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698234069; 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=nfVdSSDrAxi24nws2n5CkqyvhIesQZqlR0i9CpjYdbU=; b=ivpyI3VcayuG/nzUPzDwu+iflGZijCFVTfvWs2dBRm5F0fxTpuBrK6jiMeVC5Gqmp1mxA6 wQoscSUg4BVBDKgF+EelI3XGWgwQG+Eigex5Ko+3bCQy2lkQSxYSTaVp5DHLN5InZPqSTF qIOYYMzjFGi5aYK/txhDPdzLwqiC0Ec= X-MC-Unique: X4bPhDz8MgGyMLq7gVJLTg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 12/22] qemublocktest: testBackingXMLjsonXML: Drop 'legacy' mode Date: Wed, 25 Oct 2023 13:39:22 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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.4.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: 1698234071532100001 Content-Type: text/plain; charset="utf-8" Legacy mode used to be needed for use with -drive, which was almost completely deleted. We now have qemuxml2argvtest test cases checking a few cases and the rest uses the modern mode only. Thus we don't need to test the legacy mode any more. Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 161fd84871..b8db1a2570 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -61,8 +61,6 @@ testBackingXMLjsonXML(const void *args) g_auto(virBuffer) debug =3D VIR_BUFFER_INITIALIZER; unsigned int backendpropsflags =3D QEMU_BLOCK_STORAGE_SOURCE_BACKEND_P= ROPS_TARGET_ONLY; - if (data->legacy) - backendpropsflags |=3D QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEG= ACY; xmlsrc =3D virStorageSourceNew(); xmlsrc->type =3D data->type; @@ -81,17 +79,15 @@ testBackingXMLjsonXML(const void *args) return -1; } - if (!data->legacy) { - if (testQEMUSchemaValidate(backendprops, data->schemaroot, - data->schema, false, &debug) < 0) { - g_autofree char *debugmsg =3D virBufferContentAndReset(&debug); - g_autofree char *debugprops =3D virJSONValueToString(backendpr= ops, true); + if (testQEMUSchemaValidate(backendprops, data->schemaroot, + data->schema, false, &debug) < 0) { + g_autofree char *debugmsg =3D virBufferContentAndReset(&debug); + g_autofree char *debugprops =3D virJSONValueToString(backendprops,= true); - VIR_TEST_VERBOSE("json does not conform to QAPI schema"); - VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output= :\n %s", - debugprops, NULLSTR(debugmsg)); - return -1; - } + VIR_TEST_VERBOSE("json does not conform to QAPI schema"); + VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output:\n = %s", + debugprops, NULLSTR(debugmsg)); + return -1; } if (virJSONValueObjectAdd(&wrapper, "a:file", &backendprops, NULL) < 0) @@ -1012,11 +1008,6 @@ mymain(void) do { \ xmljsonxmldata.type =3D tpe; \ xmljsonxmldata.xml =3D xmlstr; \ - xmljsonxmldata.legacy =3D true; \ - if (virTestRun(virTestCounterNext(), testBackingXMLjsonXML, \ - &xmljsonxmldata) < 0) \ - ret =3D -1; \ - xmljsonxmldata.legacy =3D false; \ if (virTestRun(virTestCounterNext(), testBackingXMLjsonXML, \ &xmljsonxmldata) < 0) \ ret =3D -1; \ --=20 2.41.0