From nobody Sun Feb 8 19:24:57 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=1602159315; cv=none; d=zohomail.com; s=zohoarc; b=DhCvVzDJo+t03OdixxQTg+7ykycFUa9abwuxAKewm+Acz0V4p/4JP90nI626ztdpAlJl+6nh9+cXQ2vO2suZl1IXVZ2Xox8gSRJLssiMTetPDTT1A6yr9LIjgrQC6vMIdwyazrYviXs2Wy/+sPcKTcYk+E2XFqipj7OfQ1ULr6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602159315; 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=in/7hNQXbj65HZwsztT7E0H9ADmLqcSIFkj+AxTr3Bs=; b=F16fU2oI+3jJxKvqEz6QhwoW18pwUV2VN8F2Tu9RAbQ3Fp1ycv+Nk2xldXStpTmjmXmoolkAQPFMVZRslKs28av6buDWh/BNgTxvO9L2qVRK+YOT2M4ako2+NRu8uN5t2n+fVG1tE+QcK+NgYtBDsbMypgc6mbecNH1pP6Y2q8Q= 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 1602159315956762.6167754715763; Thu, 8 Oct 2020 05:15:15 -0700 (PDT) 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-556-NjvnRtChPyqpm4mYHJYj4Q-1; Thu, 08 Oct 2020 08:13:04 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11EE6104D3EA; Thu, 8 Oct 2020 12:12:46 +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 E199655785; Thu, 8 Oct 2020 12:12:45 +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 A95018C7BF; Thu, 8 Oct 2020 12:12:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 098CCPIY001324 for ; Thu, 8 Oct 2020 08:12:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7690555764; Thu, 8 Oct 2020 12:12:25 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id D49EC55761 for ; Thu, 8 Oct 2020 12:12:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602159314; 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=in/7hNQXbj65HZwsztT7E0H9ADmLqcSIFkj+AxTr3Bs=; b=Ttt3HAz4DBXokrIxMDmla1X4+AqvGcRcqQZ+b1oBbYUCsS2TPY8f/6kKGhI9wZ6B0xYbz7 aXs16KHBpDCkRTHeGM0T3x4B0LKxp1irgw4PWi+JkUx2e9O55iKOHKqePtzDA5pWRuKvEQ 9vLK4lpgPEFJv1faJ56r4IF0kP/qpFM= X-MC-Unique: NjvnRtChPyqpm4mYHJYj4Q-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 7/8] tests: delete VIR_ALLOC tests cases Date: Thu, 8 Oct 2020 14:12:13 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.15 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) There are no more users of VIR_ALLOC or VIR_ALLOC_N. Delete their test cases. Signed-off-by: J=C3=A1n Tomko --- tests/viralloctest.c | 71 -------------------------------------------- 1 file changed, 71 deletions(-) diff --git a/tests/viralloctest.c b/tests/viralloctest.c index 785728d6f9..bc7bb114c1 100644 --- a/tests/viralloctest.c +++ b/tests/viralloctest.c @@ -43,73 +43,6 @@ testCheckNonNull(void *t) return 0; } =20 -static int -testAllocScalar(const void *opaque G_GNUC_UNUSED) -{ - testDummyStruct *t; - int ret =3D -1; - - if (VIR_ALLOC(t) < 0) - return -1; - - if (testCheckNonNull(t) < 0) - goto cleanup; - - if (t->a !=3D 0 || - t->b !=3D 0) { - fprintf(stderr, "Allocated ram was not zerod\n"); - goto cleanup; - } - - VIR_FREE(t); - - if (t !=3D NULL) { - fprintf(stderr, "Pointer is still set after free\n"); - goto cleanup; - } - - ret =3D 0; - cleanup: - VIR_FREE(t); - return ret; -} - - -static int -testAllocArray(const void *opaque G_GNUC_UNUSED) -{ - testDummyStruct *t; - size_t nt =3D 10, i; - int ret =3D -1; - - if (VIR_ALLOC_N(t, nt) < 0) - return -1; - - if (testCheckNonNull(t) < 0) - goto cleanup; - - for (i =3D 0; i < nt; i++) { - if (t[i].a !=3D 0 || - t[i].b !=3D 0) { - fprintf(stderr, "Allocated ram block %zu was not zerod\n", i); - goto cleanup; - } - } - - VIR_FREE(t); - - if (t !=3D NULL) { - fprintf(stderr, "Pointer is still set after free\n"); - goto cleanup; - } - - ret =3D 0; - cleanup: - VIR_FREE(t); - return ret; -} - - static int testReallocArray(const void *opaque G_GNUC_UNUSED) { @@ -416,10 +349,6 @@ mymain(void) { int ret =3D 0; =20 - if (virTestRun("alloc scalar", testAllocScalar, NULL) < 0) - ret =3D -1; - if (virTestRun("alloc array", testAllocArray, NULL) < 0) - ret =3D -1; if (virTestRun("realloc array", testReallocArray, NULL) < 0) ret =3D -1; if (virTestRun("expand array", testExpandArray, NULL) < 0) --=20 2.26.2