Date: Sat, 2 May 2026 08:24:42 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Alan Somers <asomers@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3e845b109056 - main - ping: fix listing test cases when scapy is not installed Message-ID: <afYXOsKk5jouvCZ2@cell.glebi.us> In-Reply-To: <69f61649.1c022.73b2a773@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Sat, May 02, 2026 at 03:20:41PM +0000, Alan Somers wrote: A> commit 3e845b1090565912375c5578cf0399d27b7fa70c A> Author: Alan Somers <asomers@FreeBSD.org> A> AuthorDate: 2026-05-01 23:06:35 +0000 A> Commit: Alan Somers <asomers@FreeBSD.org> A> CommitDate: 2026-05-02 15:20:16 +0000 A> A> ping: fix listing test cases when scapy is not installed A> A> The ATF-python test program was attempting to list test cases that A> require scapy. But it attempted to import the scapy module before the A> test cases had been listed, resulting in an ImportError that kyua A> interpreted as a test program crash. A> A> Fix this behavior by handling that ImportError well enough to list test A> cases, but not run them. If scapy isn't present, Kyua will refuse to A> run the test cases. But it needs to be able to list them in order to A> know to skip them. A> A> Sponsored by: ConnectWise A> MFC after: 2 weeks A> Reviewed by: maxim A> Differential Revision: https://reviews.freebsd.org/D56765 Sorry for not reviewing in time. I don't think Kyua expects a test program to be able to list the test cases, but then fail to run them. Isn't there a standard way of dealing with the problem? Many tests have @pytest.mark.require_progs(["scapy"]) in them. -- Gleb Smirnoffhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?afYXOsKk5jouvCZ2>
