From patchwork Fri Jan 8 03:50:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 59320 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp311150lbb; Thu, 7 Jan 2016 19:53:29 -0800 (PST) X-Received: by 10.55.200.214 with SMTP id t83mr24306613qkl.13.1452225204007; Thu, 07 Jan 2016 19:53:24 -0800 (PST) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id r9si90044685qhb.7.2016.01.07.19.53.22 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 07 Jan 2016 19:53:23 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u083p4h9008851; Thu, 7 Jan 2016 22:51:04 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u083oIJa005767 for ; Thu, 7 Jan 2016 22:50:18 -0500 Received: from colepc.redhat.com (ovpn-113-33.phx2.redhat.com [10.3.113.33]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u083oBte030219; Thu, 7 Jan 2016 22:50:18 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 7 Jan 2016 22:50:03 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/12] tests: qemuxml2xml: Use standard file comparison helpers 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 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com This also makes VIR_TEST_REGENERATE_OUTPUT work --- tests/qemuxml2xmltest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index f967ceb..e3bd9c2 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -43,7 +43,7 @@ static int testXML2XMLHelper(const char *inxml, const char *inXmlData, const char *outxml, - const char *outXmlData, + const char *outXmlData ATTRIBUTE_UNUSED, bool live) { char *actual = NULL; @@ -66,10 +66,8 @@ testXML2XMLHelper(const char *inxml, if (!(actual = virDomainDefFormat(def, format_flags))) goto fail; - if (STRNEQ(outXmlData, actual)) { - virtTestDifferenceFull(stderr, outXmlData, outxml, actual, inxml); + if (virtTestCompareToFile(actual, outxml) < 0) goto fail; - } ret = 0;