From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <m.carrara@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id D1E5791269
 for <pve-devel@lists.proxmox.com>; Wed,  3 Apr 2024 13:55:33 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id AD7C7170E2
 for <pve-devel@lists.proxmox.com>; Wed,  3 Apr 2024 13:55:03 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Wed,  3 Apr 2024 13:55:02 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7677844C72
 for <pve-devel@lists.proxmox.com>; Wed,  3 Apr 2024 13:55:02 +0200 (CEST)
Content-Type: text/plain; charset=UTF-8
Date: Wed, 03 Apr 2024 13:55:01 +0200
Message-Id: <D0AGUT7AABA5.1FCS5XBM6FXU7@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>
From: "Max Carrara" <m.carrara@proxmox.com>
Mime-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-Mailer: aerc 0.17.0-72-g6a84f1331f1c
References: <20240402160736.519660-2-s.lendl@proxmox.com>
In-Reply-To: <20240402160736.519660-2-s.lendl@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.028 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [plugin.pm, evpnplugin.pm, controllers.pm, zones.pm,
 simpleplugin.pm, dnsmasq.pm]
Subject: Re: [pve-devel] [PATCH v2 pve-network 0/9] SDN: Testing VNets as a
 blackbox.
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 03 Apr 2024 11:55:33 -0000

On Tue Apr 2, 2024 at 6:07 PM CEST, Stefan Lendl wrote:
> This add several tests for SDN VNets.
> State setup as well as testing results is done only via the API to test o=
n the
> API boundaries and not against the internal state. Internal state and con=
fig
> files are mocked to avoid requiring access to system files or pmxcfs.
>
> The first 7 commits extract various functions to allow mocking them in th=
e
> tests. The tests are then added as the test_vnets_blackbox test.
> The last commit removes the old vnets tests which are not working anyway.
>
> Tests validate the events of a nic joining a Vnet or a nic staring on a v=
net
> with different subnet configurations. Further descriptions in the commit.
>
> *Several of the tests fail due to known bugs and limitations.*
> These bugs where discussed off-list with @s.hanreich and due to be fixed =
with
> the next set of SDN patches.
> Applying the tests first would allow fixing them with already existing
> tests.
>
> Differences v1 -> v2:
> * Add tests that expect a failure when no IP can be allocated
> * Removed commented out debug stuff

Just to be sure I've looked over the individual patches again - LGTM!
I've got no complaints at all. Nice work!

I'll leave the remaining things regarding the failing tests to you and
@s.hanreich, as that's your domain ;)

>
> Stefan Lendl (9):
>   sdn: extract function that reads datacenter config
>   dnsmasq: extract function to systemctl command.
>   dnsmasq: extract function that generates the ethers file path
>   dnsmasq: extract function that updates dnsmasq lease via dbus
>   controllers: extract function that reads network intreaces config
>   evpn: extract function that reads frr config.
>   api: extract function that creates the sdn directory.
>   tests: test VNets functionality as a blackbox
>   tests: remove old Vnets tests
>
>  src/PVE/API2/Network/SDN/Zones.pm             |   6 +-
>  src/PVE/Network/SDN/Controllers.pm            |  16 +-
>  src/PVE/Network/SDN/Controllers/EvpnPlugin.pm |  10 +-
>  src/PVE/Network/SDN/Dhcp/Dnsmasq.pm           |  47 +-
>  src/PVE/Network/SDN/Zones/EvpnPlugin.pm       |   3 +-
>  src/PVE/Network/SDN/Zones/Plugin.pm           |   5 +
>  src/PVE/Network/SDN/Zones/SimplePlugin.pm     |   2 +-
>  src/test/Makefile                             |   5 +-
>  src/test/run_test_vnets.pl                    | 343 -------
>  src/test/run_test_vnets_blackbox.pl           | 859 ++++++++++++++++++
>  10 files changed, 925 insertions(+), 371 deletions(-)
>  delete mode 100755 src/test/run_test_vnets.pl
>  create mode 100755 src/test/run_test_vnets_blackbox.pl