Re: git: 3e845b109056 - main - ping: fix listing test cases when scapy is not installed
- Reply: Alan Somers : "Re: git: 3e845b109056 - main - ping: fix listing test cases when scapy is not installed"
- Reply: Dag-Erling_Smørgrav : "Re: git: 3e845b109056 - main - ping: fix listing test cases when scapy is not installed"
- In reply to: Alan Somers : "git: 3e845b109056 - main - ping: fix listing test cases when scapy is not installed"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 02 May 2026 15:24:42 UTC
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 Smirnoff