From nobody Wed May 1 18:35:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; envelope-from=libvir-list-bounces@redhat.com; helo=mx5-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by mx.zohomail.com with SMTPS id 1486369496243425.98038815937264; Mon, 6 Feb 2017 00:24:56 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LSOW026576; Mon, 6 Feb 2017 03:21:28 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v168LQrx022114 for ; Mon, 6 Feb 2017 03:21:26 -0500 Received: from lisa.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LO2O020197 for ; Mon, 6 Feb 2017 03:21:26 -0500 From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 6 Feb 2017 09:21:17 +0100 Message-Id: <76ef9b870822cc71a87d19e3d77835f4cbea1daf.1486369246.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/5] tests: Trace re-executing processes with valgrind 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" A lot of our tests re-execute themeselves after loading their mock library. This, however, makes valgrind sad because currently we do not tell it to trace the process after exec(). Signed-off-by: Michal Privoznik --- tests/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index e923178f2..521728a3d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -470,7 +470,8 @@ TESTS_ENVIRONMENT =3D \ $(VG) =20 =20 -VALGRIND =3D valgrind --quiet --leak-check=3Dfull \ +VALGRIND =3D valgrind --quiet --leak-check=3Dfull --trace-children=3Dyes \ + --trace-children-skip=3D"*/tools/virsh","*/tests/commandhelper" \ --suppressions=3D$(srcdir)/.valgrind.supp valgrind: $(MAKE) check VG=3D"libtool --mode=3Dexecute $(VALGRIND)" --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 18:35:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; envelope-from=libvir-list-bounces@redhat.com; helo=mx5-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by mx.zohomail.com with SMTPS id 1486369501167917.0677176748366; Mon, 6 Feb 2017 00:25:01 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LoZf026610; Mon, 6 Feb 2017 03:21:50 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v168LRc9022122 for ; Mon, 6 Feb 2017 03:21:27 -0500 Received: from lisa.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LO2P020197 for ; Mon, 6 Feb 2017 03:21:27 -0500 From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 6 Feb 2017 09:21:18 +0100 Message-Id: <7b5f79058401196a0bec56d272308114566aef54.1486369246.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/5] virusbmock: Link with libvirt_utils 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We are using couple of functions from there (e.g. virStrdup) and rely that the binary linking us has the libvirt_utils linked already. Well, this makes valgrind sad. Signed-off-by: Michal Privoznik --- tests/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 521728a3d..7149a865e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1203,7 +1203,8 @@ virnetdevbandwidthtest_LDADD =3D $(LDADDS) $(LIBXML_L= IBS) virusbmock_la_SOURCES =3D virusbmock.c virusbmock_la_CFLAGS =3D $(AM_CFLAGS) virusbmock_la_LDFLAGS =3D $(MOCKLIBS_LDFLAGS) -virusbmock_la_LIBADD =3D $(MOCKLIBS_LIBS) +virusbmock_la_LIBADD =3D $(MOCKLIBS_LIBS) \ + ../src/libvirt_util.la =20 virnetdevbandwidthmock_la_SOURCES =3D \ virnetdevbandwidthmock.c --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 18:35:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; envelope-from=libvir-list-bounces@redhat.com; helo=mx4-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mx.zohomail.com with SMTPS id 1486369533947993.5436185493344; Mon, 6 Feb 2017 00:25:33 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v168Lq9l019652; Mon, 6 Feb 2017 03:21:52 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v168LSM1022132 for ; Mon, 6 Feb 2017 03:21:28 -0500 Received: from lisa.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LO2Q020197 for ; Mon, 6 Feb 2017 03:21:27 -0500 From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 6 Feb 2017 09:21:19 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/5] testUSBList: don't leak @dev 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" =3D=3D22187=3D=3D 77 (56 direct, 21 indirect) bytes in 1 blocks are definit= ely lost in loss record 23 of 37 =3D=3D22187=3D=3D at 0x4C2BC75: calloc (vg_replace_malloc.c:624) =3D=3D22187=3D=3D by 0x4E75685: virAlloc (viralloc.c:144) =3D=3D22187=3D=3D by 0x4F0613A: virUSBDeviceNew (virusb.c:332) =3D=3D22187=3D=3D by 0x4F05BA2: virUSBDeviceSearch (virusb.c:183) =3D=3D22187=3D=3D by 0x4F05F95: virUSBDeviceFind (virusb.c:296) =3D=3D22187=3D=3D by 0x403514: testUSBList (virusbtest.c:209) =3D=3D22187=3D=3D by 0x403BD8: virTestRun (testutils.c:180) =3D=3D22187=3D=3D by 0x4039E5: mymain (virusbtest.c:285) =3D=3D22187=3D=3D by 0x4056BC: virTestMain (testutils.c:992) =3D=3D22187=3D=3D by 0x403A4A: main (virusbtest.c:293) Signed-off-by: Michal Privoznik --- tests/virusbtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virusbtest.c b/tests/virusbtest.c index 4bbfe4af9..7cddb89af 100644 --- a/tests/virusbtest.c +++ b/tests/virusbtest.c @@ -217,6 +217,7 @@ testUSBList(const void *opaque ATTRIBUTE_UNUSED) } =20 virUSBDeviceListDel(list, dev); + virUSBDeviceFree(dev); dev =3D NULL; =20 if (testCheckNdevs("After deleting one", --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 18:35:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; envelope-from=libvir-list-bounces@redhat.com; helo=mx6-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mx.zohomail.com with SMTPS id 1486369493053843.2275141493793; Mon, 6 Feb 2017 00:24:53 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LWNT041977; Mon, 6 Feb 2017 03:21:32 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v168LT0W022140 for ; Mon, 6 Feb 2017 03:21:29 -0500 Received: from lisa.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LO2R020197 for ; Mon, 6 Feb 2017 03:21:28 -0500 From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 6 Feb 2017 09:21:20 +0100 Message-Id: <810dcd3762787406ab0acf3847a3bfa876b292b0.1486369246.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/5] qemuMonitorCPUModelInfoFree: Don't leak model_info->props 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" =3D=3D11846=3D=3D 240 bytes in 1 blocks are definitely lost in loss record = 81 of 107 =3D=3D11846=3D=3D at 0x4C2BC75: calloc (vg_replace_malloc.c:624) =3D=3D11846=3D=3D by 0x18C74242: virAllocN (viralloc.c:191) =3D=3D11846=3D=3D by 0x4A05E8: qemuMonitorCPUModelInfoCopy (qemu_monitor= .c:3677) =3D=3D11846=3D=3D by 0x446E3C: virQEMUCapsNewCopy (qemu_capabilities.c:2= 171) =3D=3D11846=3D=3D by 0x437335: testQemuCapsCopy (qemucapabilitiestest.c:= 108) =3D=3D11846=3D=3D by 0x437CD2: virTestRun (testutils.c:180) =3D=3D11846=3D=3D by 0x437AD8: mymain (qemucapabilitiestest.c:176) =3D=3D11846=3D=3D by 0x4397B6: virTestMain (testutils.c:992) =3D=3D11846=3D=3D by 0x437B44: main (qemucapabilitiestest.c:188) Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index b7be5e7f4..565339921 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3660,6 +3660,7 @@ qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfoPt= r model_info) for (i =3D 0; i < model_info->nprops; i++) VIR_FREE(model_info->props[i].name); =20 + VIR_FREE(model_info->props); VIR_FREE(model_info->name); VIR_FREE(model_info); } --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 18:35:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; envelope-from=libvir-list-bounces@redhat.com; helo=mx6-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mx.zohomail.com with SMTPS id 1486369502069913.6331265458881; Mon, 6 Feb 2017 00:25:02 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LoSZ042000; Mon, 6 Feb 2017 03:21:50 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v168LUhs022147 for ; Mon, 6 Feb 2017 03:21:30 -0500 Received: from lisa.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v168LO2S020197 for ; Mon, 6 Feb 2017 03:21:29 -0500 From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 6 Feb 2017 09:21:21 +0100 Message-Id: <89d0a6151b06999ebf208530d31426036ffdf8fc.1486369246.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] xenFoxenFormatXLDisk: Don't leak @target 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" =3D=3D11260=3D=3D 1,006 bytes in 1 blocks are definitely lost in loss recor= d 106 of 111 =3D=3D11260=3D=3D at 0x4C2AE5F: malloc (vg_replace_malloc.c:297) =3D=3D11260=3D=3D by 0x4C2BDFF: realloc (vg_replace_malloc.c:693) =3D=3D11260=3D=3D by 0x4EA430B: virReallocN (viralloc.c:245) =3D=3D11260=3D=3D by 0x4EA7C52: virBufferGrow (virbuffer.c:130) =3D=3D11260=3D=3D by 0x4EA7D28: virBufferAdd (virbuffer.c:165) =3D=3D11260=3D=3D by 0x4EA8E10: virBufferStrcat (virbuffer.c:718) =3D=3D11260=3D=3D by 0x42D263: xenFormatXLDiskSrcNet (xen_xl.c:960) =3D=3D11260=3D=3D by 0x42D4EB: xenFormatXLDiskSrc (xen_xl.c:1015) =3D=3D11260=3D=3D by 0x42D870: xenFormatXLDisk (xen_xl.c:1101) =3D=3D11260=3D=3D by 0x42DA89: xenFormatXLDomainDisks (xen_xl.c:1148) =3D=3D11260=3D=3D by 0x42EAF8: xenFormatXL (xen_xl.c:1558) =3D=3D11260=3D=3D by 0x40E85F: testCompareParseXML (xlconfigtest.c:105) Signed-off-by: Michal Privoznik --- src/xenconfig/xen_xl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 18d9fe369..2c9174e53 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -1034,6 +1034,7 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDe= fPtr disk) int format =3D virDomainDiskGetFormat(disk); const char *driver =3D virDomainDiskGetDriver(disk); char *target =3D NULL; + int ret =3D -1; =20 /* format */ virBufferAddLit(&buf, "format=3D"); @@ -1119,12 +1120,12 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDisk= DefPtr disk) tmp->next =3D val; else list->list =3D val; - return 0; + ret =3D 0; =20 cleanup: VIR_FREE(target); virBufferFreeAndReset(&buf); - return -1; + return ret; } =20 =20 --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list