From nobody Sat May 4 12:12:17 2024 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=1561411487; cv=none; d=zoho.com; s=zohoarc; b=aathRRyn3BniQiBivhEB/u/sQ8KBr0wQ1L3mKA8t1p5gH1hxFunLKmX/zWuPiFf/qahY+jd1wV5QD3hFKa7a+FXH0phv+QyauU940NAvFELtS8njdZExY1+4uUPQk467BfjEzgzfG5FJBT6XcjmRRivtwYFweWYFvbdbcHnUvWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561411487; 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=2e8W/3cYRo/OKBdGlV3KRNlov/imkqqNfk+Qqx0tkIU=; b=Z6a5HSAIudeiJ9alsz2Q+OlxigoxwmhDdZ0jVAnwuU7glxtW5MZjEncIq1vpCSJb1OYMYTxaNMrVt/UnRBOMoP/qlRcGCKOtb1Ce1G+e9bXOENA+NozufGhkIdeGCkRF1lF92HrRS4+fhzP2CktZu4wdxgkAGQF9hvYq9+Fp/Hg= 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 1561411487760695.4488097580003; Mon, 24 Jun 2019 14:24:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CD9959473; Mon, 24 Jun 2019 21: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 846D260BFB; Mon, 24 Jun 2019 21:24:11 +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 507343D87; Mon, 24 Jun 2019 21:24:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5OLNxkd008236 for ; Mon, 24 Jun 2019 17:23:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7A2B45C238; Mon, 24 Jun 2019 21:23:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7508C5C236 for ; Mon, 24 Jun 2019 21:23:57 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 50D04882F5 for ; Mon, 24 Jun 2019 21:23:47 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id f17so759876wme.2 for ; Mon, 24 Jun 2019 14:23:47 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id r2sm1039182wma.26.2019.06.24.14.23.44 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 14:23:45 -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=0l3zCXZub6x7vgKpyMQ4rjpq58yfLSxmQuZrngJ47RQ=; b=R4lFaLqEZhnEfUBWqo4CcsAFS+91AVcCDvAllh9H+Kvwg0j+79i2FGZM2jCaZU/cLE 3AOd3N6nuYqedGqtkDa1lNoYCe5C/gxhZ2jKndr4Xe3cCUUPVyFdYP6ER2fsniX0jtkt h1aathehqXEwvCT+Jo5AViQwNIo1pKQnqWc4/HZ4t7k+bO0Tfz13YcnSF8genddaniwM xMXh3Jx33bfy9ZcPVEAH8Sa+By0p2Lcohf22zsBk1AB0Y54GHkaayRfGSf6a+FTrVZXZ hz3ieYfONJbxluxC2UQrmfhF7gyXVH3wiLC0k7WvyCwP8A1CJRoH8FAY0yGGVvfTOm5Y Y22g== 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=0l3zCXZub6x7vgKpyMQ4rjpq58yfLSxmQuZrngJ47RQ=; b=RIU4yLfvq5bMK3RVJchNlav4eo6LIP1fhHxFDtNgmuxNq/KhuZIxQ3jNgnkml20qPA ULRui4O2TdMYd+nD/syKGNdpeW7toJPpUrvzhwUSSmmXN526u3l4zkJu6T0TOm7gs9nf sVt0LvhJ2Tfub2tKOH5CVDnFg6QgnQDrg+LeZ2mVQwZHHYhIcJ0dJdkXQE+poT9l2Ep/ RJFnn9MRpuKdrRzPLv+N32qhAsWFCQOeWvs1mkyhPNWw4SFKjmTw74AR1NmoSWIr1orm f565k7T20M7rI/qt8qfaD1V8t/hyDvYDYp/IXFaI3Je2bOczcy62deXskGeoyuhpanx5 8TuQ== X-Gm-Message-State: APjAAAUeV2MVR9/3apbJQ8KKG35Jm9TROFLiUAwxuPgCElRpfSpuQxAP MRSKIBXZVrkNxnchgsO7rHIOJck284ozvA== X-Google-Smtp-Source: APXvYqxfkMOEoOp+W8ecY8tex9Yh4i9IiHcXDFKSwDHtY4IXWazoPW5ttyeloCPKGesHAEbzb354Sg== X-Received: by 2002:a7b:c842:: with SMTP id c2mr17245216wml.28.1561411425653; Mon, 24 Jun 2019 14:23:45 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Mon, 24 Jun 2019 23:23:17 +0200 Message-Id: <20190624212318.25494-2-stamatis.iliass@gmail.com> In-Reply-To: <20190624212318.25494-1-stamatis.iliass@gmail.com> References: <20190624212318.25494-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.28]); Mon, 24 Jun 2019 21:23:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 24 Jun 2019 21:23:47 +0000 (UTC) for IP:'209.85.128.65' DOMAIN:'mail-wm1-f65.google.com' HELO:'mail-wm1-f65.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.11 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.128.65 mail-wm1-f65.google.com 209.85.128.65 mail-wm1-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] test_driver: use addr_offset for non-network infs too 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 24 Jun 2019 21:24:43 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The addr_offset can be used even for the hard-coded addresses in an attempt to always return unique ips. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4b1f2724a0..d3bc6e7bce 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3508,6 +3508,8 @@ testDomainInterfaceAddresses(virDomainPtr dom, goto cleanup; for (i =3D 0; i < vm->def->nnets; i++) { + /* try using different addresses per different inf and domain */ + const size_t addr_offset =3D 20 * (vm->def->id - 1) + i + 1; const virDomainNetDef *net =3D vm->def->nets[i]; if (VIR_ALLOC(iface) < 0) @@ -3525,18 +3527,14 @@ testDomainInterfaceAddresses(virDomainPtr dom, iface->naddrs =3D 1; if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK) { - /* try using different addresses per different inf and domain = */ - const size_t addr_offset =3D 20 * (vm->def->id - 1) + i + 1; - if (testDomainInterfaceAddressFromNet(dom->conn->privateData, net, addr_offset, iface)= < 0) goto cleanup; } else { iface->addrs[0].type =3D VIR_IP_ADDR_TYPE_IPV4; iface->addrs[0].prefix =3D 24; - if (virAsprintf(&iface->addrs[0].addr, "192.168.0.%zu", 1 + i)= < 0) + if (virAsprintf(&iface->addrs[0].addr, "192.168.0.%zu", addr_o= ffset) < 0) goto cleanup; - } VIR_APPEND_ELEMENT_INPLACE(ifaces_ret, ifaces_count, iface); -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 12:12:17 2024 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=1561411540; cv=none; d=zoho.com; s=zohoarc; b=VtQewgfYSjfL1WhKdbPSJUVQ9ADJ6orC5WXGKKv644I7QM0Kg/V3D1XXv0KxnXTMh3UoljsQdKwFmufFUukP45Gts7YEjAbsKvmnesifid2BHL/oor/svqkpiWu60Mo3MGxZaBi07P3G3IjsZoFGfbsE9DGyu+kXVKNqhReAQX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561411540; 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=y1HIexBB4uCjNJoWR7KhrcXWhktFrUIWxldtztOwlpY=; b=kDjf2KNIwaHkTyAwF+kkl8/u5VzgUlscNzSbxuYTIE6Br4haTYBKVjEtCJXHSeVYKTnS405OzG2zqfyeX+1MRqPVfmv17g1K4m3nTaSqMpwKDz7bC7yLJyjQWwNwCA3p6L5FqZyi1kID+tX3MrqmjHngTKzslfITsGCjHUtycVk= 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 1561411540319970.4302536336603; Mon, 24 Jun 2019 14:25:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7F1D3084032; Mon, 24 Jun 2019 21:25: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 C087860BE2; Mon, 24 Jun 2019 21:25: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 83EF2C598; Mon, 24 Jun 2019 21:25:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5OLOMmC008692 for ; Mon, 24 Jun 2019 17:24:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F140600D1; Mon, 24 Jun 2019 21:24:22 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A06A600CD for ; Mon, 24 Jun 2019 21:24:20 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (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 D3F1930821EC for ; Mon, 24 Jun 2019 21:24:06 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id d18so15445883wrs.5 for ; Mon, 24 Jun 2019 14:24:06 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id r2sm1039182wma.26.2019.06.24.14.24.04 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 14:24:04 -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=L9mfNrF27SVXQFI0hU4kdhrfr/Hxgx/zE424Ps+U9rE=; b=Pn1XXJiXRNpkp3OYqJisI+uhxxBKu4AYaNU/SlHUIHol9j73LGmZVl8jND75XT888O RJtBVNHymAqq2IouIuY1ys1nG+jBkhQulacd0aw7fUc5Hez5FQodjN6mvxYqyB4tzpzy Yt7BTgLaVV7X25/ckb0GBkc4WBIOCA78ImDLOWrzj88YNbuwk3yuqPZJnf2yXFgFr/U+ l0YBYn6RkfxZoo00BsrargJJfdOuh3Rcu1B0fCbmgpZp3IJJ4fFGyGIBCdwCVHs1v27+ OOfNwyPhy/GvfSCNiin0X2dYT9o+5droEdM1SFAfUelPiwKYphxzse5KH8RhUSmxNb65 H37g== 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=L9mfNrF27SVXQFI0hU4kdhrfr/Hxgx/zE424Ps+U9rE=; b=Zr9+izXdxrtyVNAatW3Drskuy5QkQMCXclILSLjJLwaNbsjT2Oz4jlkGdBaj7MjJ7c o169f3icjY6h7245SUXiD23ONP684999EaD4LBzgdTx7rFfYRpHDQ5qSdRZzgO6WDQLU AeO9XYiFkrv7gyI3j8hVr6/dFxkgyB42Nk1ODVuENQdqev3Ti1LtueuylZLpDqNSgSZQ MHhfe7du37aZ9FbfORUNBlgpKwYsXBVAWhFUaBEshsvv+gYmSQb3cZAysw8vC4csrxbH GTo1Cx0osw8tDCr390Rb0PPTg4wqLp1wEM2qQbT8Wh7LkX4KMVn+VJiCrxigUjEmPoRP L50A== X-Gm-Message-State: APjAAAXtMX3bxK7IZ17arJYBHKa+a3mtBpNGP2cHObVvgEhJshJI2YWU zrrDADi1uQrEKTL9PBftx+H28uI3EqdM+Q== X-Google-Smtp-Source: APXvYqzYKP5KWlkRoEEZzzdFllbXWuIJpeR/QXBirp/eruPgD5kQ+U7Oxzxcj3baEMmwmSn6TrKk3g== X-Received: by 2002:a5d:5283:: with SMTP id c3mr28712400wrv.268.1561411445192; Mon, 24 Jun 2019 14:24:05 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Mon, 24 Jun 2019 23:23:18 +0200 Message-Id: <20190624212318.25494-3-stamatis.iliass@gmail.com> In-Reply-To: <20190624212318.25494-1-stamatis.iliass@gmail.com> References: <20190624212318.25494-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.47]); Mon, 24 Jun 2019 21:24:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 24 Jun 2019 21:24:07 +0000 (UTC) for IP:'209.85.221.67' DOMAIN:'mail-wr1-f67.google.com' HELO:'mail-wr1-f67.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.11 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.221.67 mail-wr1-f67.google.com 209.85.221.67 mail-wr1-f67.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] test_driver: use virDomainNetDefPtr instead of virDomainNetDef * 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 24 Jun 2019 21:25:33 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d3bc6e7bce..868dadd682 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3433,7 +3433,7 @@ static int testDomainBlockStats(virDomainPtr domain, static int testDomainInterfaceAddressFromNet(testDriverPtr driver, - const virDomainNetDef *net, + virDomainNetDefPtr const net, size_t addr_offset, virDomainInterfacePtr iface) { @@ -3510,7 +3510,7 @@ testDomainInterfaceAddresses(virDomainPtr dom, for (i =3D 0; i < vm->def->nnets; i++) { /* try using different addresses per different inf and domain */ const size_t addr_offset =3D 20 * (vm->def->id - 1) + i + 1; - const virDomainNetDef *net =3D vm->def->nets[i]; + virDomainNetDefPtr const net =3D vm->def->nets[i]; if (VIR_ALLOC(iface) < 0) goto cleanup; -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list