From nobody Mon Feb 2 05:57:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769774455; cv=none; d=zohomail.com; s=zohoarc; b=kRzfku7oVz6idvu0f+iFq1xjpc+ieAQMbWbpV/J2tzXE92XO+dBD9CyJnqjnhZuvfAt4kGIs6Gby8tUq73fSzoySKQbBD1O/pJ7XC23oiRY8DEGHuWhWWPmZgn6MTQ0CUZxMxMypvCUczi9pP0EsEGMfQ/3FBlzQA5b24MoqCbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769774455; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=Q3pFn3xB7oK61xe/RRBPrAqCkPMnGzdRECDkhEB4Scc=; b=KuxSicLM4b/WOP8uy2SiRBCTa2WrIfGbimhFf/Yd8JtILipKuxQkikKdNH/xBPXBI3pizVRfCoprb8rTh/Zxgoe6+vLXqfpLl4umXQt2jn7pV4gMQ87Ahc+peyH/kIoVEu1VOEbOYKVqhRKqJljefLnPCEjQ3MC/ctI39fzcaGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769774455032187.14444338086867; Fri, 30 Jan 2026 04:00:55 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 2FBE23F96E; Fri, 30 Jan 2026 07:00:54 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id AE8D941A1D; Fri, 30 Jan 2026 07:00:17 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 8644C417EC; Fri, 30 Jan 2026 07:00:14 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B22B83F95F for ; Fri, 30 Jan 2026 07:00:13 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-6-pNI8QIMPNkaokOOf47hvPQ-1; Fri, 30 Jan 2026 07:00:11 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0795D1956059 for ; Fri, 30 Jan 2026 12:00:11 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 649221800995 for ; Fri, 30 Jan 2026 12:00:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769774413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3pFn3xB7oK61xe/RRBPrAqCkPMnGzdRECDkhEB4Scc=; b=JV8YLYi1Am1AHE48ljK5U3Ktxw0PXta4Qp1Ub3gMHCpxFM97qq6rNjrcNQ4rFPh3vhxX0g F+foqUG4Owb7RckmpWitJqEwLoNh0E/eG8o0ZIkU7+/GpWfpl0cDgbUM3r8VpR88xMASLS F6ARDFhZdouz9nJisd4ArebkKYH2xFI= X-MC-Unique: pNI8QIMPNkaokOOf47hvPQ-1 X-Mimecast-MFC-AGG-ID: pNI8QIMPNkaokOOf47hvPQ_1769774411 To: devel@lists.libvirt.org Subject: [PATCH] networkxmlconftest: Expect success for "hostdev" case only on Linux Date: Fri, 30 Jan 2026 13:00:08 +0100 Message-ID: <1d1affcbf41e81513de4b695f1bf27100cf91a3e.1769774408.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: T4CMUP1gjEDJAAK5spZ6ym-JE_ys1JUQZxEMSPAFjbQ_1769774411 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IXFTNG6KFPSHUGDJVVF3EGANEBCTTPHJ X-Message-ID-Hash: IXFTNG6KFPSHUGDJVVF3EGANEBCTTPHJ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; 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: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769774456417158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Our network has multiple means of forwarding the traffic and 'hostdev' is one of them. This mode means that the network is configured to use a set of PCI devices which are then assigned to individual domains to use (PCI device assignment). Now, as of v12.0.0-61-gecb2e06bdf our test runners (testCompareXMLToXMLFiles() and testCompareXMLToConfFiles()) call networkValidateTests(). For aforementioned type of network this means checking that the specified set of devices contains only VFs (see v3.2.0-rc1~24 for more info). It is true that our virpcimock is preloaded which mimics VFs, but our utils module (virpci.c specifically) talks to sysfs to check various PCI device attributes, including whether it's a VF. This obviously works on Linux and doesn't work anywhere else. Therefore, until our utils module is taught how to check PCI attribs on other systems, make the "hostdev" test case expect validation failure on non-Linux systems. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- tests/networkxmlconftest.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/networkxmlconftest.c b/tests/networkxmlconftest.c index b32a39c553..b74d5b14f5 100644 --- a/tests/networkxmlconftest.c +++ b/tests/networkxmlconftest.c @@ -313,7 +313,16 @@ mymain(void) DO_TEST("bandwidth-network"); DO_TEST("openvswitch-net"); DO_TEST_VALIDATE_ERROR("passthrough-pf"); +#ifdef __linux__ DO_TEST("hostdev"); +#else + /* Our test runners call networkValidateTests() which for + * means validating that PCI + * devices are VFs. It's done so by querying sysfs which + * obviously works on Linux only. Thus, expect a validation + * error elsewhere. */ + DO_TEST_VALIDATE_ERROR("hostdev"); +#endif DO_TEST_FLAGS("hostdev-pf", VIR_NETWORK_XML_INACTIVE); DO_TEST_FLAGS("hostdev-pf-driver-model", VIR_NETWORK_XML_INACTIVE); DO_TEST("ptr-domains-auto"); --=20 2.52.0