From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 6BFD4BC214 for ; Thu, 21 Dec 2023 16:30:34 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 508821B35B for ; Thu, 21 Dec 2023 16:30:34 +0100 (CET) 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 ; Thu, 21 Dec 2023 16:30:33 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 859F1489D8 for ; Thu, 21 Dec 2023 16:30:33 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Thu, 21 Dec 2023 16:30:22 +0100 Message-Id: <20231221153025.678700-2-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231221153025.678700-1-f.gruenbichler@proxmox.com> References: <20231221153025.678700-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.186 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 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH common 1/4] network tests: switch to ifupdown2 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2023 15:30:34 -0000 adapt allow-* to auto, and drop the one test where behaviour is not testable anymore. Signed-off-by: Fabian Grünbichler --- test/etc_network_interfaces/runtest.pl | 2 +- .../t.bridge_eth_remove_auto.pl | 24 ------------------- .../t.create_network.pl | 6 ++--- .../t.ovs_bridge_allow.pl | 12 +++++----- 4 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 test/etc_network_interfaces/t.bridge_eth_remove_auto.pl diff --git a/test/etc_network_interfaces/runtest.pl b/test/etc_network_interfaces/runtest.pl index f92f5ae..10fafae 100755 --- a/test/etc_network_interfaces/runtest.pl +++ b/test/etc_network_interfaces/runtest.pl @@ -78,7 +78,7 @@ sub r($;$$) { sub w() { # write shouldn't be able to change a previously parsed config my $config_clone = dclone($config); - return PVE::INotify::__write_etc_network_interfaces($config_clone); + return PVE::INotify::__write_etc_network_interfaces($config_clone, 1); } ## diff --git a/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl b/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl deleted file mode 100644 index 98f5df8..0000000 --- a/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl +++ /dev/null @@ -1,24 +0,0 @@ -use strict; - -# access to the current config -our $config; - -# replace proc_net_dev with one with a bunch of interfaces -save('proc_net_dev', <<'/proc/net/dev'); -eth0: -eth1: -/proc/net/dev - -r(''); -update_iface('eth0', [], autostart => 1); -update_iface('eth1', [], autostart => 1); -r(w()); -die "autostart lost" if !$config->{ifaces}->{eth0}->{autostart}; -die "autostart lost" if !$config->{ifaces}->{eth1}->{autostart}; -new_iface("vmbr0", 'bridge', [{ family => 'inet' }], bridge_ports => 'eth0'); -new_iface("vmbr1", 'OVSBridge', [{ family => 'inet' }], ovs_ports => 'eth1'); -r(w()); -die "autostart wrongly removed for linux bridge port" if !$config->{ifaces}->{eth0}->{autostart}; -die "autostart not removed for ovs bridge port" if $config->{ifaces}->{eth1}->{autostart}; - -1; diff --git a/test/etc_network_interfaces/t.create_network.pl b/test/etc_network_interfaces/t.create_network.pl index b8da513..6aad74c 100644 --- a/test/etc_network_interfaces/t.create_network.pl +++ b/test/etc_network_interfaces/t.create_network.pl @@ -420,7 +420,7 @@ auto eth1.100 iface eth1.100 inet manual mtu 1400 -allow-vmbr6 ovsintvlan +auto ovsintvlan iface ovsintvlan inet manual ovs_type OVSIntPort ovs_bridge vmbr6 @@ -429,7 +429,7 @@ iface ovsintvlan inet manual $bond0_part -allow-vmbr6 bond1 +auto bond1 iface bond1 inet manual ovs_bonds eth4 eth5 ovs_type OVSBond @@ -464,7 +464,7 @@ iface vmbr5 inet manual bridge-fd 0 mtu 1100 -allow-ovs vmbr6 +auto vmbr6 iface vmbr6 inet manual ovs_type OVSBridge ovs_ports bond1 ovsintvlan diff --git a/test/etc_network_interfaces/t.ovs_bridge_allow.pl b/test/etc_network_interfaces/t.ovs_bridge_allow.pl index 9479ff5..742c9ef 100644 --- a/test/etc_network_interfaces/t.ovs_bridge_allow.pl +++ b/test/etc_network_interfaces/t.ovs_bridge_allow.pl @@ -37,7 +37,7 @@ iface eth2 inet manual iface eth3 inet manual -allow-ovs vmbr0 +auto vmbr0 iface vmbr0 inet static address $ip gateway $gw @@ -52,19 +52,19 @@ expect load('loopback') . <<"/etc/network/interfaces"; auto eth0 iface eth0 inet manual -allow-vmbr0 eth1 +auto eth1 iface eth1 inet manual ovs_type OVSPort ovs_bridge vmbr0 -allow-vmbr0 eth2 +auto eth2 iface eth2 inet manual ovs_type OVSPort ovs_bridge vmbr0 iface eth3 inet manual -allow-ovs vmbr0 +auto vmbr0 iface vmbr0 inet static address $ip gateway $gw @@ -89,7 +89,7 @@ expect load('loopback') . <<"/etc/network/interfaces"; auto eth0 iface eth0 inet manual -allow-vmbr0 eth1 +auto eth1 iface eth1 inet manual ovs_type OVSPort ovs_bridge vmbr0 @@ -98,7 +98,7 @@ iface eth3 inet manual iface eth2 inet manual -allow-ovs vmbr0 +auto vmbr0 iface vmbr0 inet static address $ip gateway $gw -- 2.39.2