From nobody Mon Feb 9 04:15:25 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=1612187013; cv=none; d=zohomail.com; s=zohoarc; b=BKsVQFp9HRfmsOIm2Xl6bJOxw/0sxlDUzxA9tn54dWVt8ShKNr4/uS+Bkb08CReOJvV8QZrtXIitkuZpjbXi2ASpgLUG7bj3CzNEJrxRV6PPkXlKOyQyGu2CsOGQq1RvAWECyj8BB5LvGXP+Z73p0yUK+n2Gg7mzDL4EQqDM9to= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612187013; 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=we28aF3xUCZKzj4r+oQUWGF3a5//Z602phOEy8Nl+dU=; b=WJMCr+xyHAuKw6ba/CxqcgqHLxjscTUPbXUlqkIQFOiYRAwhY+tCaoR/0U1HCgd5BFzjgvdElO291+yavLwHrzn2gO7Vu6K1hNIKqFaruzUu2gCRh0QUC8KjxO75RG5q12/TidufBmNz/Lv1vLF0iAXd+KDy+gGt+c1xtqxyxGo= 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) header.from= 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 1612187013955802.1406164248376; Mon, 1 Feb 2021 05:43:33 -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-31-rFMYnlcBOCCpMimUEtcDVg-1; Mon, 01 Feb 2021 08:43:30 -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 4E707801AC0; Mon, 1 Feb 2021 13:43:24 +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 1DFC81975E; Mon, 1 Feb 2021 13:43:24 +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 D7CE450038; Mon, 1 Feb 2021 13:43:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 111DdW2a023599 for ; Mon, 1 Feb 2021 08:39:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id DF0F960C69; Mon, 1 Feb 2021 13:39:32 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35E6360C66 for ; Mon, 1 Feb 2021 13:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612187013; 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=we28aF3xUCZKzj4r+oQUWGF3a5//Z602phOEy8Nl+dU=; b=Cc2wDgE6BG6z4pbFGLYmRwDxCqir5fvt79M0+tFFpfKW8wkZI5vZ4Lidac4BmYrk+eKku9 iG0xasV6BqYt2wXOq7uB2uRmcLlVmwknyZG82E/yAaM+YS6/GowtUoDOcg0AUPONy9XN9J EMhtWDlgkz7+gQjPsPcY/LmvxgbOIh0= X-MC-Unique: rFMYnlcBOCCpMimUEtcDVg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/14] tests: viralloc: Remove testDispose case Date: Mon, 1 Feb 2021 14:39:05 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The VIR_DISPOSE* APIs will be phased out. Additionally the test isn't really doing useful work in ensuring that the values are indeed cleared thus there's no point in keeping it around. Signed-off-by: Peter Krempa --- tests/viralloctest.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/tests/viralloctest.c b/tests/viralloctest.c index 8ea98b8eca..0867be8ce1 100644 --- a/tests/viralloctest.c +++ b/tests/viralloctest.c @@ -312,38 +312,6 @@ testInsertArray(const void *opaque G_GNUC_UNUSED) } -static int -testDispose(const void *opaque G_GNUC_UNUSED) -{ - int *num =3D NULL; - int *nums =3D NULL; - size_t nnums =3D 0; - char *str =3D NULL; - - VIR_DISPOSE(num); - VIR_DISPOSE_N(nums, nnums); - VIR_DISPOSE_STRING(str); - - nnums =3D 10; - VIR_DISPOSE_N(nums, nnums); - - num =3D g_new0(int, 1); - - VIR_DISPOSE(num); - - nnums =3D 10; - nums =3D g_new0(int, nnums); - - VIR_DISPOSE_N(nums, nnums); - - str =3D g_strdup("test"); - - VIR_DISPOSE_STRING(str); - - return 0; -} - - static int mymain(void) { @@ -357,8 +325,6 @@ mymain(void) ret =3D -1; if (virTestRun("insert array", testInsertArray, NULL) < 0) ret =3D -1; - if (virTestRun("dispose tests", testDispose, NULL) < 0) - ret =3D -1; return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.29.2