From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1582331074; cv=none; d=zohomail.com; s=zohoarc; b=eP9Gclduwi7wLimANCcM+npoNTsgmKy6zmLfH8WlHx92rUuDMPPM5da50pGYPz+fLpAQPoQFIoSF5fOodlVOs1/DEc838XsDmT1UiKWBKLaHfyvqG0ydrq0jDYYQed+mTpZ8BjzU5XIeU8nLSs1DXOCpPL3ATQsZe3Jt46HeRsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331074; 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=iET5RP57CDCnSAFQ8EfNsLRYyoB4N2gZJeZ4HeO6fi8=; b=TAglqnk+Ffmde4g5/RTRIchSnFK9IxVcvR4ZFvpmzgTusW25j/PqgXWh6MwJj8rgH3zigE24rjEKcJwF5RK7zsecNyAVucJ0ZhcrE3pbG/e/wjoYWbghtXOjt8/4kdZaRh0GdYWK/4ZCNuKhGpFXh+ducQO/XK5W+EBZWcJmyws= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1582331074837949.7642123162661; Fri, 21 Feb 2020 16:24:34 -0800 (PST) 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-158-IYuxFWLdM4WrRUhH7xPERw-1; Fri, 21 Feb 2020 19:24:30 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BB85107ACC9; Sat, 22 Feb 2020 00:24:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45DE11001B28; Sat, 22 Feb 2020 00:24:25 +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 9374F860C8; Sat, 22 Feb 2020 00:24:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0OIA4002558 for ; Fri, 21 Feb 2020 19:24:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 027189076C; Sat, 22 Feb 2020 00:24:18 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4964E90785 for ; Sat, 22 Feb 2020 00:24:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331073; 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=iET5RP57CDCnSAFQ8EfNsLRYyoB4N2gZJeZ4HeO6fi8=; b=DTbhOy0t2XRNjCxhyhk8ttXHzJaxnS0V8ow85EbYMro0vO1CPaHndI+xJLj6/Itw4hebVe xvRCOKv4oH1xSWQaIlItbmQuFvhrTltCZZtpXqIr4D92Qofw8WLkTZ20umMi2LT8vAsHcc JuAPYRHGvfvNFtjWkXlrt3fpskJmuKE= X-MC-Unique: IYuxFWLdM4WrRUhH7xPERw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/7] tests: valgrind.supp: suppress g_type_register_static leaks Date: Sat, 22 Feb 2020 01:24:06 +0100 Message-Id: <2f30cf3854a4c05998875e2c445b3497d57d78bd.1582331034.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When a type is registered, it holds allocated memory until the program exits. Add an exception to valgrind.supp to make the output of make -C tests valgrind more readable. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- tests/.valgrind.supp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index 6fb724ff13..f78b3b1f72 100644 --- a/tests/.valgrind.supp +++ b/tests/.valgrind.supp @@ -148,3 +148,16 @@ fun:virObjectUnref fun:main } +# +# types registered with GLib are never freed +# +{ + glibTypeRegisterLeak + Memcheck:Leak + match-leak-kinds: possible + ... + fun:g_realloc + obj:*/lib*/libgobject* + fun:g_type_register_static + ... +} --=20 2.24.1 From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1582331118; cv=none; d=zohomail.com; s=zohoarc; b=UPHAyZAOvF3tDzI5XchNCbO3/7Nt7Rqtb8p5lq3gVjzkg3n4dhydDmeYYSN/T9d0cZkhwnjRltURmv5yuX1VErFQZA5d2gE5FYsxtk+jR7/5Nfv82SIzM5rnRtpa1Zma9N3HxVNKj4VeUd6XUPeTfzdZirjbX9lR6K6cvAqstPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331118; 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=yDs7KGlh64FBkaBPLGeZ8RdW+rPqJmzW6Ij9L/boAS4=; b=EhnwLKcr9sU3uOjUbEX8fs+pWIqi6MHPDVFRH3sFchvTGpGuWauAcMjpeGMIH2cB/GLTHvOAQ4itbBxWG+IPe/agmzxiko36qb2LDMznWNqVz3rc6t9bLDl94HSzeAKwbufswJZFiFLqyZjMhIKmQ2maZMkf3bmNZl2X0A/bGmY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 158233111893296.04320063697594; Fri, 21 Feb 2020 16:25:18 -0800 (PST) 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-18-JuKMyE_YPeiq72a4Rs2G8w-1; Fri, 21 Feb 2020 19:25:15 -0500 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 228E28010EB; Sat, 22 Feb 2020 00:25:09 +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 E5CC290775; Sat, 22 Feb 2020 00:25:08 +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 6B5E318089D0; Sat, 22 Feb 2020 00:25:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0OJoW002568 for ; Fri, 21 Feb 2020 19:24:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6C43890775; Sat, 22 Feb 2020 00:24:19 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFC119076C for ; Sat, 22 Feb 2020 00:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331117; 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=yDs7KGlh64FBkaBPLGeZ8RdW+rPqJmzW6Ij9L/boAS4=; b=LqjII7ODZjMQtpZxwxBc/oOE1mAxTPLcK2qDVu9vUSFZly1OPGq3/S4XnNP2BxD8Oh9WXF twapYX7tS9Ai3XqTEqyHAlK3OhsAEKGnrsA2SBosWrlEfYrWxLLbKyOETDegOLmPi7WTZ9 G+1slMUk79V3iO+1Puu7Aseg3X4LgHQ= X-MC-Unique: JuKMyE_YPeiq72a4Rs2G8w-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/7] tests: valgrind: do not trace system binaries Date: Sat, 22 Feb 2020 01:24:07 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add /usr/bin/* to -trace-children-skip Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index ed5255b62d..7c76b5cec6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -482,7 +482,7 @@ TESTS_ENVIRONMENT =3D \ =20 =20 VALGRIND =3D valgrind --quiet --leak-check=3Dfull --trace-children=3Dyes \ - --trace-children-skip=3D"*/tools/virsh","*/tests/commandhelper" \ + --trace-children-skip=3D"*/tools/virsh","*/tests/commandhelper","/usr/bin= /*" \ --suppressions=3D$(abs_srcdir)/.valgrind.supp valgrind: $(MAKE) check VG=3D"$(LIBTOOL) --mode=3Dexecute $(VALGRIND)" --=20 2.24.1 From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1582331074; cv=none; d=zohomail.com; s=zohoarc; b=VYu6S6RiC907rKiORtBEY3wk06KArDkqpvJg0fwvepuY2dNL+ra6DmBEoKp+HACLpIzjG2vSWyw1xj1FoYVhzatlF0CEOJ8/r60eda0dFZYxMS5RWhjCclVRnwDJR/WXqKOeAz4lzVCRUfQFeEmGP8/arueyQutBOfCyrJqMWiw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331074; 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=1GkW3eVQzCYvdQE4MHiNbVyifAP6vMwyKovrCUDQvnE=; b=GWR3UYIB7VhTPtT+y103drIR+z5UB2iJm/hUz130ON63J+FZ6kmIjrCDvjRWHJxDQoZRUppRlagCexf95q3IMbFx3WwkEPHqZvHowkwvPFi5ZPokoqjGTP63R9E8unxcJ9wtzuNQbtswDLoHBS+kcOfw8ISIrrh6mgWWGyE/Ryw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 158233107462444.57200349686309; Fri, 21 Feb 2020 16:24:34 -0800 (PST) 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-270-txo743pRMTi0KnSun2RtmA-1; Fri, 21 Feb 2020 19:24:30 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F2D8107ACCC; Sat, 22 Feb 2020 00:24:25 +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 19AF91001B07; Sat, 22 Feb 2020 00:24:25 +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 AFEF718089C8; Sat, 22 Feb 2020 00:24:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0OKmt002575 for ; Fri, 21 Feb 2020 19:24:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id A4EB99076C; Sat, 22 Feb 2020 00:24:20 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB6F190775 for ; Sat, 22 Feb 2020 00:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331073; 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=1GkW3eVQzCYvdQE4MHiNbVyifAP6vMwyKovrCUDQvnE=; b=cdx8PHhfz4KKUfncPh8oX+wKHSACQCWrrkvz0fMPy2idasOJIXhXIqM7aD4xB6lYFVRAkm 77mnctGPRxYoMNC0KUMXHB/sV+xZ2v8erZb+cdWXtMeClrQJiJps6ys+8bOfy0kDcQDpD0 TaG+0Cj+azpsiIn9AJzo2PblqdPuYak= X-MC-Unique: txo743pRMTi0KnSun2RtmA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/7] qemumonitorjsontest: do not leak qapiData.schema Date: Sat, 22 Feb 2020 01:24:08 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Free the x86_64 schema before overwriting it with s390x schema. Signed-off-by: J=C3=A1n Tomko Fixes: eee09435eec46553aac4fdf1c2d8f3214167bded Reviewed-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index e9f95e317d..40fc40bddd 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3375,6 +3375,7 @@ mymain(void) =20 #undef DO_TEST_QUERY_JOBS =20 + virHashFree(qapiData.schema); if (!(qapiData.schema =3D testQEMUSchemaLoad("s390x"))) { VIR_TEST_VERBOSE("failed to load qapi schema for s390x"); ret =3D -1; --=20 2.24.1 From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1582331118; cv=none; d=zohomail.com; s=zohoarc; b=g1XmfC/pWP3vC0Z4IOs03bQWrNOEiKZY3PqrDQEa+fOo/s4ANnmIiJUeAQ1y6US4tJmY8clqPT1GusHRlk18mM6j2RI1sUAaikZYgfDihHXUik37U1gzZLSt9smVxRMK4AI2ENuRVx63RqKjm9MB2wMigHjUe0BDEYr15lX/hWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331118; 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=wy3Fl1M2nVR9JR7/olXHjtXONYNmHzVojcXSHYhzacA=; b=DmY2Ey48RSPlOafqzC4B0oQJ+8vtdumfueZwAUpOuP5246f4FjHkyeC2bsp6rVmywo7WNCDLIigwfeVZQuqC2skQ7bGSJ0Msly+zGJpz0sdjHEjJ/vP+Fr9tmFfwE2oyRE48UyKwSqQVfIHMH0oeculrB4kzjFpclBV8zHN1eu4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1582331118740430.96896383002706; Fri, 21 Feb 2020 16:25:18 -0800 (PST) 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-285-H832IBDXMVyuzatc5yyb5Q-1; Fri, 21 Feb 2020 19:25:15 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13C9E1088382; Sat, 22 Feb 2020 00:25:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0F0D5C1D4; Sat, 22 Feb 2020 00:25:08 +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 76CDD860CE; Sat, 22 Feb 2020 00:25:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0OMvM002590 for ; Fri, 21 Feb 2020 19:24:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 19B1090775; Sat, 22 Feb 2020 00:24:22 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 471CC9076C for ; Sat, 22 Feb 2020 00:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331117; 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=wy3Fl1M2nVR9JR7/olXHjtXONYNmHzVojcXSHYhzacA=; b=UH0XQs84I/0mYQmXU8O+hx5bapDwDebljrTFdip5NxYsw+EcphsfGNfwQiqp5VyfSSnZ30 qlexou2GaUV/tUMS5P9H17Bj+Fc0ZiiByP1cufirfZkR6Mn1SOzM3Rn9BmWpFGy8GvsMN8 BnlO1qFmG/cra6kiVgOzyaK7w5C2Ivc= X-MC-Unique: H832IBDXMVyuzatc5yyb5Q-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/7] qemumonitorjsontest: use virCPUDefNew() Date: Sat, 22 Feb 2020 01:24:09 +0100 Message-Id: <6a92c019b035b24124d4aaead58ec187c3f25f48.1582331034.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" virCPUDefPtr uses refcounting internally and must be allocated using virCPUDefNew, otherwise virCPUDefFree would be a no-op. Signed-off-by: J=C3=A1n Tomko Fixes: fa2404bf4f91813431beb797fc30a1237a743823 Fixes: eee09435eec46553aac4fdf1c2d8f3214167bded Reviewed-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 40fc40bddd..1a090b0cb5 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2997,8 +2997,8 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelComparis= on(const void *opaque) "{\"return\":{\"result\":\"test\"}}") < 0) return -1; =20 - if (VIR_ALLOC(cpu_a) < 0 || VIR_ALLOC(cpu_b) < 0) - goto cleanup; + cpu_a =3D virCPUDefNew(); + cpu_b =3D virCPUDefNew(); =20 cpu_a->model =3D g_strdup("cpu_a"); cpu_b->model =3D g_strdup("cpu_b"); @@ -3049,8 +3049,8 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelBaseline= (const void *opaque) "}") < 0) return -1; =20 - if (VIR_ALLOC(cpu_a) < 0 || VIR_ALLOC(cpu_b) < 0) - goto cleanup; + cpu_a =3D virCPUDefNew(); + cpu_b =3D virCPUDefNew(); =20 cpu_a->model =3D g_strdup("cpu_a"); cpu_b->model =3D g_strdup("cpu_b"); --=20 2.24.1 From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1582331165; cv=none; d=zohomail.com; s=zohoarc; b=Br2vdxOgtCtUWWZ4AUdFg/Sj0HXx2TIx8B9BdZ71frq7Pj/xsPP1AuMsZbix4xS/EvwVlH83IitRneFpjGK5OC8EAm3HxIoNM2XIrXJoyIUT7bm5YiaOJ58kvRgoKIdERLnTWwE6YJ/lwFeH3OXxtEVXZTpu+TgeFWA/QawkYS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331165; 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=xoQo82dpl/aTgdWZFHzXLsq1EAmB43S4pY8rGbbGm7A=; b=I+oE1991bpQ3Uh51P0j0xS6rxmUK3pYKsKoJTxlXsvEEX8zm14mjbNr59ReU9HUwx5wFYPVR/FbGWsVMfinrj6ZPbmDRCl3IgXpgMy+XIFhzcibNwENk/mLsi3Ujp88XjE5zbqMnB0J8RI180FSAJ1BYEKIMA3qXJ83zEWkiCC8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1582331165015454.240432619452; Fri, 21 Feb 2020 16:26:05 -0800 (PST) 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-285-EzjJG4yONVe_3swx-yu1Dw-1; Fri, 21 Feb 2020 19:25:15 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 037D710753F6; Sat, 22 Feb 2020 00:25:09 +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 B5EFB60499; Sat, 22 Feb 2020 00:25:08 +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 6231018089CF; Sat, 22 Feb 2020 00:25:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0ON6c002595 for ; Fri, 21 Feb 2020 19:24:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 51B7990775; Sat, 22 Feb 2020 00:24:23 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 888279076C for ; Sat, 22 Feb 2020 00:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331162; 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=xoQo82dpl/aTgdWZFHzXLsq1EAmB43S4pY8rGbbGm7A=; b=Refd1GESqdpjCOowA9jJb290ILWUSdbODfQEDdiN0DAXkgg5e+K0Viuc51aweqmbd4Wfbq JNiVKKWmgG74nYMsO0NlFXecerS4bCh7pAfSLtScf4BVKkKC1UtmnioU2Tgi1T+JCHKBwF LGgZ4yrbdoryd9RjQx/jUsrRlyGdduc= X-MC-Unique: EzjJG4yONVe_3swx-yu1Dw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 5/7] virsystemdtest: do not leak socket path Date: Sat, 22 Feb 2020 01:24:10 +0100 Message-Id: <5f60cfefe204affd955998f741d19a58c473cd9c.1582331034.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use an autofree'd helper variable to store the socket path and free it after the function finishes. Signed-off-by: J=C3=A1n Tomko Fixes: 5b8569dd6e284b9159c701e8bffafb196983fc4a Reviewed-by: Michal Privoznik --- tests/virsystemdtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c index a9b02af7db..2ba288d032 100644 --- a/tests/virsystemdtest.c +++ b/tests/virsystemdtest.c @@ -554,12 +554,15 @@ testActivation(bool useNames) size_t nfds =3D 0; g_autoptr(virSystemdActivation) act =3D NULL; g_auto(virBuffer) names =3D VIR_BUFFER_INITIALIZER; + g_autofree char *demo_socket_path =3D NULL; =20 virBufferAddLit(&names, "demo-unix.socket"); =20 if (testActivationCreateFDs(&sockUNIX, &sockIP, &nsockIP) < 0) return -1; =20 + demo_socket_path =3D virNetSocketGetPath(sockUNIX); + for (i =3D 0; i < nsockIP; i++) virBufferAddLit(&names, ":demo-ip.socket"); =20 @@ -576,7 +579,7 @@ testActivation(bool useNames) =20 map[0].name =3D "demo-unix.socket"; map[0].family =3D AF_UNIX; - map[0].path =3D virNetSocketGetPath(sockUNIX); + map[0].path =3D demo_socket_path; =20 map[1].name =3D "demo-ip.socket"; map[1].family =3D AF_INET; --=20 2.24.1 From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1582331141; cv=none; d=zohomail.com; s=zohoarc; b=R557NLqhdxtrMhAkzzNO5hjoIdGBKIILcn9Dea65OCeZJTN4q+pXmHW3f+j+SggL35QO0GRHbHakVlB/gjAh57azEIwuW0IhZNEaDZCUPHVyzRub5kDXuS/CW117/UqsHqWN+UpDcxTCj0ztSvoTTcEyeBok3A047xtDsqUhgHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331141; 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=9umXA57S+VgNvKb4f7y/Yv3vLzQcgr+FJM7pPGhsaoY=; b=dP4GJIwWyBqhHkY9xrV4wWu07hItyZLDzq/v6cSMWFLFyMQ4fTztebN2M0m+8Oo+8UJB0wHe/uFX9Q1G2aimgf1s3aQ11ajszocKGbWn1DnKu0Qq4voKOdwEII3mqMnoGILTahtlwz62qdn5cS6Abi3HeL1p5qpQL5PHErvsLYk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1582331141662990.9760835763136; Fri, 21 Feb 2020 16:25:41 -0800 (PST) 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-220-jir7rm5aMuOhftjBwuNzgQ-1; Fri, 21 Feb 2020 19:25:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B589DB64; Sat, 22 Feb 2020 00:25:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3326885735; Sat, 22 Feb 2020 00:25:32 +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 E3B79860C8; Sat, 22 Feb 2020 00:25:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0OOku002605 for ; Fri, 21 Feb 2020 19:24:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id BB39990775; Sat, 22 Feb 2020 00:24:24 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AE9A9076C for ; Sat, 22 Feb 2020 00:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331140; 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=9umXA57S+VgNvKb4f7y/Yv3vLzQcgr+FJM7pPGhsaoY=; b=M5mgEIhP5CexJN/X+B1wAxKLnU4bbMuIF6tFrOnm1TcqPk9zLrKaAI53Oif/tX3TWTPPpX y8r3m+rVT2V/PAz/lM2bTB12+gJp32Tua796uDBC6LfX9SCM/+oVV/XkOlJxLF6NZtJti9 TtGAYeIB5+hGA82M50whtTd7ssmB2nM= X-MC-Unique: jir7rm5aMuOhftjBwuNzgQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 6/7] qemumonitorjsontest: GetCPUModelComparison: use g_auto Date: Sat, 22 Feb 2020 01:24:11 +0100 Message-Id: <1aa42b022744c3f11338c550e4b241554df774b6.1582331034.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use g_autoptr for the virCPUDef variables and get rid of the cleanup label. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 1a090b0cb5..168d6cd172 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2985,10 +2985,9 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelCompari= son(const void *opaque) { const testGenericData *data =3D opaque; g_autoptr(qemuMonitorTest) test =3D NULL; - virCPUDefPtr cpu_a; - virCPUDefPtr cpu_b =3D NULL; + g_autoptr(virCPUDef) cpu_a =3D virCPUDefNew(); + g_autoptr(virCPUDef) cpu_b =3D virCPUDefNew(); g_autofree char *result =3D NULL; - int ret =3D -1; =20 if (!(test =3D qemuMonitorTestNewSchema(data->xmlopt, data->schema))) return -1; @@ -2997,28 +2996,20 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelCompar= ison(const void *opaque) "{\"return\":{\"result\":\"test\"}}") < 0) return -1; =20 - cpu_a =3D virCPUDefNew(); - cpu_b =3D virCPUDefNew(); - cpu_a->model =3D g_strdup("cpu_a"); cpu_b->model =3D g_strdup("cpu_b"); =20 if (qemuMonitorJSONGetCPUModelComparison(qemuMonitorTestGetMonitor(tes= t), cpu_a, cpu_b, &result) < 0) - goto cleanup; + return -1; =20 if (!result || STRNEQ(result, "test")) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", "Compare result not set"); - goto cleanup; + return -1; } =20 - ret =3D 0; - - cleanup: - virCPUDefFree(cpu_a); - virCPUDefFree(cpu_b); - return ret; + return 0; } =20 =20 --=20 2.24.1 From nobody Sun Apr 28 04:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1582331140; cv=none; d=zohomail.com; s=zohoarc; b=TQouZCVWT0BBRDcy5amag49gbFx+oAG60DxagJLmWcRgVERkSNnnDccUfshJCWk1ZdVXBkL/hFEHXlW1vkwkOn4k979sxDPo2YCl+u8C2BMIHCAXUBkyIyZJwELTf1trn8JB1BtUSO63gy9XOYNIXj1k2xdUWMwgiAi6a6LGtN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582331140; 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=sEELMuiVcda3FOVdxVFR4MwjwHiEBO6Frax5buXgBn4=; b=J9KgXtUSYYunULCIrXCBZh+Nmxh1OdY34JsjJCYFvThY0RINCFqtMQxH1HrtEqt+pTt29K2MWS0/VRDOPazoFqwjFx37CarF23d0H/G1FrhNviHv6UltebGnFW/nx+mjg2OCOQGMDXLJMSfJlfmrcLXD49Wtt3oHicYBWbLu4pM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1582331140603543.668265719473; Fri, 21 Feb 2020 16:25:40 -0800 (PST) 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-465-U0_0jWC-Ns-yHplGyyJrMg-1; Fri, 21 Feb 2020 19:25:37 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80D358017CC; Sat, 22 Feb 2020 00:25:31 +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 5424A386; Sat, 22 Feb 2020 00:25:31 +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 1027F18089CD; Sat, 22 Feb 2020 00:25:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M0OQ43002620 for ; Fri, 21 Feb 2020 19:24:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 18F9690787; Sat, 22 Feb 2020 00:24:26 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 369EB9076C for ; Sat, 22 Feb 2020 00:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582331139; 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=sEELMuiVcda3FOVdxVFR4MwjwHiEBO6Frax5buXgBn4=; b=J5H6iy9R+R7sSTG46gZmx2F33emUvMhI7ugggWbVECzcYeJXTAVQ9YSr8n1ggXCr3NwI4U viaODjkGcs5uF71lsCLpcwv4yp6GXuifY+Hh16mTaGKX2uudJCbTWwoXBGrIiHMSqv1wrr k7mDPd9RovfrW3zwC/xoMtsp9+aB6i8= X-MC-Unique: U0_0jWC-Ns-yHplGyyJrMg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 7/7] qemumonitorjsontest: GetCPUModelBaseline: use g_auto Date: Sat, 22 Feb 2020 01:24:12 +0100 Message-Id: <02a57cabc4bff74598b82651f98ee07229b8cb61.1582331034.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use g_autoptr for the virCPUDef variables. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 168d6cd172..d3bee2043e 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3018,8 +3018,8 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelBaseline= (const void *opaque) { const testGenericData *data =3D opaque; g_autoptr(qemuMonitorTest) test =3D NULL; - virCPUDefPtr cpu_a; - virCPUDefPtr cpu_b =3D NULL; + g_autoptr(virCPUDef) cpu_a =3D virCPUDefNew(); + g_autoptr(virCPUDef) cpu_b =3D virCPUDefNew(); qemuMonitorCPUModelInfoPtr baseline =3D NULL; int ret =3D -1; =20 @@ -3040,9 +3040,6 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelBaseline= (const void *opaque) "}") < 0) return -1; =20 - cpu_a =3D virCPUDefNew(); - cpu_b =3D virCPUDefNew(); - cpu_a->model =3D g_strdup("cpu_a"); cpu_b->model =3D g_strdup("cpu_b"); =20 @@ -3082,8 +3079,6 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelBaseline= (const void *opaque) ret =3D 0; =20 cleanup: - virCPUDefFree(cpu_a); - virCPUDefFree(cpu_b); qemuMonitorCPUModelInfoFree(baseline); return ret; } --=20 2.24.1