From nobody Sun Feb 8 19:02:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1560943211; cv=none; d=zoho.com; s=zohoarc; b=kQcbSf6bdFXQQEtVOOjgfo8Ik8mJe3MlsojFts7T9e8KpHlG4+cq4Rl1BjaLLmZkRTc5sk5DxVIuIzDaTvTszImCZppOhGhJMkrOFCJEeGEZ9I/AJi9dscNnYRJAUWhH9qY5vcb9nkqRvHZ9cLvLUiHazGfA00F+jQtborSaxj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560943211; 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:ARC-Authentication-Results; bh=Fe85qowUptBQhn2PiKZf52tqzp9sFaC7roq6KcdOrqQ=; b=nCYjJUbPDdXV99vtLOGl4DcT4FdPHf6q3L9xkz1CbKPuG4LjaEWopphLgcaacfiJzEuInAuCOUk/gm60xr1Waj2jga2+9YF7CGm7gBfbLBkHVRfFJbzlYpDZJ1hKXK7xg5huM8Uv3lr+Ek+w99D6HNA9ZUzp1g1SCXg8oK2BY0U= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560943211382807.1549807190731; Wed, 19 Jun 2019 04:20:11 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 34A9B30860B3; Wed, 19 Jun 2019 11:19:58 +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 0F70810190A7; Wed, 19 Jun 2019 11:19:55 +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 C6A9219726; Wed, 19 Jun 2019 11:19:52 +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 x5JBJZwr012267 for ; Wed, 19 Jun 2019 07:19:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F7CB5D71D; Wed, 19 Jun 2019 11:19:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4AEF85D71B for ; Wed, 19 Jun 2019 11:19:33 +0000 (UTC) Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE71036883 for ; Wed, 19 Jun 2019 11:19:21 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id m10so26658075edv.6 for ; Wed, 19 Jun 2019 04:19:21 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id y21sm3183020ejm.60.2019.06.19.04.19.19 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 04:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lbT/QvIitcQQBm0TYJwTHYw4cluwmAy77FIU8cuIWg0=; b=NCjNRoPvlTbUY4pPrMD9pQJt3Yg9sACiZQ4XxpCfD8jOIRNlWvvqSJZTUXvMLm9XZF gRaH5SdNvKlbmghF/1/J15xNqSg2qLvgp4PqNwxnwxnM/U2PFmOU/hSO3E785CGEBR9d qwgLjCqKYoAJJikiUtYWlxYNBKTcSYz62J2iqJaFmru1griTdEEL2GhFRvafKAeM4iHX SDXluWLCCiA6hSOgpicyBKg9d5E7oAwW/E+W1jHSQvmIYVq+VmSqv6J35jT18JHG1vXV kHhmqrWbJ4GoF3w8RTcwgaOAahI/yReZeQn0tydCc9korOVOR8SHSjF88x2AgqdHjJQn pgXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lbT/QvIitcQQBm0TYJwTHYw4cluwmAy77FIU8cuIWg0=; b=LajsVaQfB7bbw1pv33ucVZuG/AZklEgg/mV1ROQY0tl7SGODp3lw5Ymxs3NYcQuEor MbLf86dGXYNKC0drpAMAnr1v4m6pdJIeGPKhYsTD/xhmXpgO9USve5i1JCr6mm3hfjsW vI8yaQVNVpfacVAO9yjMyM618mBIUBA0DF4WGpYT2OPZfoqmijOE7FLAREx/G9lTTDvS 2CA0LmROk3ZmapeV4dMUc3ALyhHElwfbq9fGWIhKAtEfwsRXlp241TscB6HR+whB/BxB yK1aYc5MROFwCb1xCgyxCil+fBztIVBlhUb+9DHQcWQVxCXYDitcZVKt7GUE9ugPY/x1 9Gdw== X-Gm-Message-State: APjAAAWVag+f0AZJJEialQn2cjkvu+8Rg/3ZnOoDd4jcYZkRGnljkoRQ 6+9bKH4WQ6FLsc08FR6k+pH4FgpCy7q/ag== X-Google-Smtp-Source: APXvYqz26VH1PmH1gNAmkWV3ZW1KPq4lv92oTR1gWxOhbNwVdS8FXUo9kTtN4ig7s7Ijm+bZqwaZBQ== X-Received: by 2002:a17:906:d052:: with SMTP id bo18mr24622755ejb.311.1560943160193; Wed, 19 Jun 2019 04:19:20 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 13:18:16 +0200 Message-Id: <20190619111817.19562-3-stamatis.iliass@gmail.com> In-Reply-To: <20190619111817.19562-1-stamatis.iliass@gmail.com> References: <20190619111817.19562-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 19 Jun 2019 11:19:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 19 Jun 2019 11:19:21 +0000 (UTC) for IP:'209.85.208.66' DOMAIN:'mail-ed1-f66.google.com' HELO:'mail-ed1-f66.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_PASS) 209.85.208.66 mail-ed1-f66.google.com 209.85.208.66 mail-ed1-f66.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] test_driver: return addresses only for nets of type network 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: , Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 19 Jun 2019 11:20:02 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 437df9cdf9..0c2cfdd2f7 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3409,10 +3409,10 @@ testDomainInterfaceAddresses(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto cleanup; - if (VIR_ALLOC_N(ifaces_ret, vm->def->nnets) < 0) - goto cleanup; - for (i =3D 0; i < vm->def->nnets; i++) { + if (vm->def->nets[i]->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) + continue; + if (VIR_ALLOC(iface) < 0) goto cleanup; @@ -3433,7 +3433,8 @@ testDomainInterfaceAddresses(virDomainPtr dom, iface->naddrs =3D 1; - VIR_APPEND_ELEMENT_INPLACE(ifaces_ret, ifaces_count, iface); + if (VIR_APPEND_ELEMENT(ifaces_ret, ifaces_count, iface) < 0) + goto cleanup; } VIR_STEAL_PTR(*ifaces, ifaces_ret); -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list