From nobody Sun Feb 8 10:43:29 2026 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 1536759084035526.6538150021894; Wed, 12 Sep 2018 06:31:24 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3D103091D4E; Wed, 12 Sep 2018 13:31:21 +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 B0BB8194B3; Wed, 12 Sep 2018 13:31:21 +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 3C6C4180613A; Wed, 12 Sep 2018 13:31:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8CDV9Hu023636 for ; Wed, 12 Sep 2018 09:31:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id D48111049490; Wed, 12 Sep 2018 13:31:09 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 748EB105546A for ; Wed, 12 Sep 2018 13:31:09 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 12 Sep 2018 15:30:50 +0200 Message-Id: <8b8b7045ec4ee89b0ed09df8610c6607dbe0c91d.1536758711.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 4/7] tests: report errors in QEMU XML->startup XML tests 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 12 Sep 2018 13:31:22 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Now that the function is only run if requested by the FLAG_STEAL_VM flag, we know that missing data is an error, not a request to skip the test. The existence of the output file is now checked by virTestCompareToFile, which allows usage of the VIR_TEST_REGENERATE_OUTPUT=3D1 env variable to generate new test cases. Signed-off-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ac6df86618..fe6e38e61a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -442,18 +442,15 @@ testCompareXMLToStartupXML(const void *data) char *actual =3D NULL; int ret =3D -1; =20 - if (!info->vm) - return EXIT_AM_SKIP; + if (!info->vm) { + VIR_TEST_DEBUG("VM object missing. Did the args conversion succeed= ?"); + return -1; + } =20 if (virAsprintf(&xml, "%s/qemuxml2startupxmloutdata/%s.xml", abs_srcdir, info->name) < 0) goto cleanup; =20 - if (!virFileExists(xml)) { - ret =3D EXIT_AM_SKIP; - goto cleanup; - } - if (!(actual =3D virDomainDefFormat(info->vm->def, NULL, format_flags)= )) goto cleanup; =20 --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list