From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D66841FF144 for ; Tue, 24 Mar 2026 10:03:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 78C8F80B5; Tue, 24 Mar 2026 10:03:42 +0100 (CET) Date: Tue, 24 Mar 2026 10:03:04 +0100 From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: Re: [PATCH proxmox-ve-rs v7 10/21] frr: add vtysh integration tests for proxmox-frr Message-ID: Mail-Followup-To: pve-devel@lists.proxmox.com References: <20260323134934.243110-1-g.goller@proxmox.com> <20260323134934.243110-11-g.goller@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260323134934.243110-11-g.goller@proxmox.com> User-Agent: NeoMutt/20241002-35-39f9a6 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774342938340 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HXRQD23G2AHOYI7EUHT75F5AK5O5C2QP X-Message-ID-Hash: HXRQD23G2AHOYI7EUHT75F5AK5O5C2QP X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 23.03.2026 14:49, Gabriel Goller wrote: > Add integration tests that render FrrConfig structs to frr configuration > text and validate them against a real vtysh (frr) instance. The tests use > vtysh's dry-run mode, which checks for syntax errors and limited semantic > errors without requiring the other FRR daemons. > > Tests are split across several files covering common topologies: > - BGP/EVPN (leaf/spine iBGP, EVPN-only, IPv6-only, maximal config) > - Multi-protocol combinations (BGP + OSPF + IS-IS + OpenFabric) > - Route maps, ACLs, prefix lists, protocol route maps > - Edge cases (static routes, VRFs with routes, neighbor local-as, etc.) > > Since the tests require a local vtysh installation, the `test-with` crate > is used to automatically mark them as `ignored` when the vtysh binary is > not present. > > To allow constructing config structs directly in tests, a few changes > are made to the serializer types: > - Make `IpRoute`, `AddressFamilies`, and `Redistribute` fields public > - Expose `create_env()` from `ser/serializer.rs` > - Add `IsisRouterName::new` constructor and `From` impl > - Add `PrefixListName::new` constructor > - Add `CsnpInterval::new`, `HelloInterval::new`, and > `HelloMultiplier::new` constructors in proxmox-sdn-types, each > validating the given value against the declared API schema constraints > > Reviewed-by: Hannes Laimer > Tested-by: Stefan Hanreich Ah, this commit is new and doesn't have a Tested-by and Reviewed-by yet, so disregard these two lines. Sorry about that! > Signed-off-by: Gabriel Goller > --- > proxmox-frr/Cargo.toml | 3 + > proxmox-frr/src/ser/bgp.rs | 6 +- > proxmox-frr/src/ser/isis.rs | 16 +- > proxmox-frr/src/ser/mod.rs | 8 +- > proxmox-frr/src/ser/route_map.rs | 6 + > proxmox-frr/src/ser/serializer.rs | 2 +- > proxmox-frr/tests/bgp_evpn.rs | 844 +++++++++++++ > proxmox-frr/tests/common/mod.rs | 69 ++ > proxmox-frr/tests/fabric_ospf_openfabric.rs | 569 +++++++++ > proxmox-frr/tests/template_validation.rs | 676 ++++++++++ > proxmox-frr/tests/weird_combinations.rs | 1225 +++++++++++++++++++ > proxmox-sdn-types/src/openfabric.rs | 32 +- > 12 files changed, 3445 insertions(+), 11 deletions(-) > create mode 100644 proxmox-frr/tests/bgp_evpn.rs > create mode 100644 proxmox-frr/tests/common/mod.rs > create mode 100644 proxmox-frr/tests/fabric_ospf_openfabric.rs > create mode 100644 proxmox-frr/tests/template_validation.rs > create mode 100644 proxmox-frr/tests/weird_combinations.rs >