From nobody Mon Feb 9 01:22:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1629471013; cv=none; d=zohomail.com; s=zohoarc; b=DIlAOWwMO4N3TvMen050HJcirpcAb4APBKny5UFlHMs1yS1X/SaZe212Vf4QsyMybHprOxVoZ5QIquZBMu6XP/GUOkk84lgX2EruV37CqPj4WkvxTKDWHdfSl6uSzCYnuCB73ln92sKCYxJIennJrK5cdfY+JDXJzT69NlnHwmg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629471013; 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=bNLTka+4nH+o/G19yxx5oicXrEpFqA7ZaIXHfaGIXO0=; b=Se8klzJ378k8IBQcU4NrkZAdALqYuSdHkEfqcSBN4W6YD4jT6bOCjFcJvsPyIKDhdesL8SA8Zr0MJt1mtCEg5Camkb0SqiqCT+LcLYk3ZzjE5+Qu/2TBJnH3E1Q4gAx/OORUWnQvPnvX4ItKi4I+p+BvJQIffbVrqnAO5JCon+8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629471013112356.39164208997033; Fri, 20 Aug 2021 07:50:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-480-UkgwQ45zOv6Vlpylh_ILbQ-1; Fri, 20 Aug 2021 10:49:31 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D83AE3E74D; Fri, 20 Aug 2021 14:49:23 +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 BD4F51B46B; Fri, 20 Aug 2021 14:49:23 +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 8C276181A2A7; Fri, 20 Aug 2021 14:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17KEn5gG025578 for ; Fri, 20 Aug 2021 10:49:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id DDA086A901; Fri, 20 Aug 2021 14:49:05 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 670F65D741 for ; Fri, 20 Aug 2021 14:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629471012; 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=bNLTka+4nH+o/G19yxx5oicXrEpFqA7ZaIXHfaGIXO0=; b=FmjcchpTiU2GFf3RG+PmNMQALWbSKb+6g3aFXGwnq3W+2FQ6oBtRktYsVUzr8nZZ1fQxsT KJ+AChruo1gcFP0pmAolmZF9jIosDUqU3zFLfTF31F4Lte4OuR9cdJqDPCceMd4r55PCls U/0Lh9aHlKgmqlabP05/gHkGxgLS3t0= X-MC-Unique: UkgwQ45zOv6Vlpylh_ILbQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 9/9] tests: qemuxml2*test: switch to virRunTestLog Date: Fri, 20 Aug 2021 16:48:51 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629471132827100001 This essentially reverts: commit ca5c8e1dc7801854d856cfc62f2054ae753a40c3 qemuxml2argvtest: Avoid conditions in test macro Signed-off-by: J=C3=A1n Tomko --- tests/qemustatusxml2xmltest.c | 3 +-- tests/qemuxml2argvtest.c | 10 ++-------- tests/qemuxml2xmltest.c | 9 +++------ tests/testutilsqemu.h | 1 - 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/qemustatusxml2xmltest.c b/tests/qemustatusxml2xmltest.c index f6bde507a1..d58f4b69da 100644 --- a/tests/qemustatusxml2xmltest.c +++ b/tests/qemustatusxml2xmltest.c @@ -83,8 +83,7 @@ mymain(void) g_autoptr(virConnect) conn =3D NULL; struct testQemuConf testConf =3D { .capslatest =3D capslatest, .capscache =3D capscache, - .qapiSchemaCache =3D NULL, - .retptr =3D NULL }; + .qapiSchemaCache =3D NULL }; =20 if (!capslatest) return EXIT_FAILURE; diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 4ce7ed5f00..00a85988d6 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -766,8 +766,6 @@ testCompareXMLToArgv(const void *data) goto cleanup; } =20 - log =3D virTestLogContentAndReset(); - VIR_FREE(log); virResetLastError(); =20 if (!(cmd =3D testCompareXMLToArgvCreateArgs(&driver, vm, migrateURI, = info, @@ -826,9 +824,6 @@ testCompareXMLToArgv(const void *data) if (info->arch !=3D VIR_ARCH_NONE && info->arch !=3D VIR_ARCH_X86_64) qemuTestSetHostArch(&driver, VIR_ARCH_NONE); =20 - if (ret < 0) - *info->conf->retptr =3D ret; - return ret; } =20 @@ -856,8 +851,7 @@ mymain(void) g_autoptr(GHashTable) capscache =3D virHashNew(virObjectFreeHashData); struct testQemuConf testConf =3D { .capslatest =3D capslatest, .capscache =3D capscache, - .qapiSchemaCache =3D qapiSchemaCache, - .retptr =3D &ret }; + .qapiSchemaCache =3D qapiSchemaCache = }; =20 if (!capslatest) return EXIT_FAILURE; @@ -952,7 +946,7 @@ mymain(void) }; \ testQemuInfoSetArgs(&info, &testConf, __VA_ARGS__); \ testInfoSetPaths(&info, _suffix); \ - virTestRun("QEMU XML-2-ARGV " _name _suffix, testCompareXMLToArgv,= &info); \ + virTestRunLog(&ret, "QEMU XML-2-ARGV " _name _suffix, testCompareX= MLToArgv, &info); \ testQemuInfoClear(&info); \ } while (0) =20 diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0413a130c3..6d3526f91f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -55,7 +55,6 @@ testXML2XMLActive(const void *opaque) info->infile, info->outfile, true, info->parseFlags, TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS= ) < 0) { - *info->conf->retptr =3D -1; return -1; } =20 @@ -73,7 +72,6 @@ testXML2XMLInactive(const void *opaque) info->infile, info->outfile, false, info->parseFlags, TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS= ) < 0) { - *info->conf->retptr =3D -1; return -1; } =20 @@ -118,8 +116,7 @@ mymain(void) g_autoptr(virConnect) conn =3D NULL; struct testQemuConf testConf =3D { .capslatest =3D capslatest, .capscache =3D capscache, - .qapiSchemaCache =3D NULL, - .retptr =3D &ret }; + .qapiSchemaCache =3D NULL }; =20 if (!capslatest) return EXIT_FAILURE; @@ -168,12 +165,12 @@ mymain(void) \ if (when & WHEN_INACTIVE) { \ testInfoSetPaths(&info, suffix, WHEN_INACTIVE); \ - virTestRun("QEMU XML-2-XML-inactive " _name, testXML2XMLInacti= ve, &info); \ + virTestRunLog(&ret, "QEMU XML-2-XML-inactive " _name, testXML2= XMLInactive, &info); \ } \ \ if (when & WHEN_ACTIVE) { \ testInfoSetPaths(&info, suffix, WHEN_ACTIVE); \ - virTestRun("QEMU XML-2-XML-active " _name, testXML2XMLActive, = &info); \ + virTestRunLog(&ret, "QEMU XML-2-XML-active " _name, testXML2XM= LActive, &info); \ } \ testQemuInfoClear(&info); \ } while (0) diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 64562cbd1c..d59fa53239 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -58,7 +58,6 @@ struct testQemuConf { GHashTable *capscache; GHashTable *capslatest; GHashTable *qapiSchemaCache; - int *retptr; }; =20 struct testQemuArgs { --=20 2.31.1