From nobody Wed May 20 01:28:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKv7X5Q4Yz6dt7V for ; Wed, 20 May 2026 01:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKv7X4fNYz4NwJ for ; Wed, 20 May 2026 01:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779240504; 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=glpc7KZRjtwrjz2QzquboHLwMj2LkEJiTPMbUUp+Lv0=; b=jrkCRcKSCJW0tWAMB2rrQIoJvTWtcwTMQH+DCmd4TbuFX11dZMdlm5mf19f94SPC+LKDPO mLzF3RH8H4I9O8WG0qYWwzHgEMzWhxs2qccy9RTGGlUOyt31s5aZYfQrtxC1+U9HKa5Bef BLhO4iWCjCP2OVB3TBfalvXtPNk+yTnavWEe9pcUWAGrra/iPg1MU11v0ZDMO6RiwuGAUV p+IfQ+dLgDkjmda/QlP4XGf3njAmc9nLHPrzE9pe8z6ryxo0Kwlm3/t3M3gnphv3HeCn90 Ix22KZE4sxuVqN7KrUmbCVD5CWl4owvFd3tPEBkPCt6gbK8h9qY6cGCbhP+Mdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779240504; a=rsa-sha256; cv=none; b=Gl8c95uEHQZpz/YDidZyxuF51+siTCAtJr/qOnmHOU6AIssv46+zpeRF84hGge/FeLYcB8 zXAum2zq5s9RiDLLF+Tz183qqYgIN5HR+qj/SbBKg6q7p9M4m7HEnuv/pq+Ej0xw9/EVCp LxbFOzTZrRiHrF5b+J2rrvwX8l/O2jyMDc4ZE4UbSXyEKKDznpHR9lyo84j0BzceBdJ/7R pF0D24wVK+A9Ne2azz0wEvJGHgsRH1lrowrCOFBa5/Ga0LS/OTIKH2TdaqGyRjPoq/JR9y KlfoQ7uF1gP+Os2ZJVtCIyEvE9D+zrptGdORGImnWnARfjDeuEDY22LvTjoV/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779240504; 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=glpc7KZRjtwrjz2QzquboHLwMj2LkEJiTPMbUUp+Lv0=; b=dxyiUi1iJOLbS5PLeLE6r0++Ya6n/aAXD1evsratn2OBCoLkiOf3bUpeML82blZw3z8adZ vqWHDDmhp/l/0e92AKzVIcDYsCN0qvRFFTSTBEl5Q/pE7FkeAaVrWiburTGv7MbJsXNQhV MxJ18TPXrgCQxbvWVmKmeAQ+DKyBumynkGNXXHeuM9X/s/xx/dzwXUtCdhJMDfX/7kqk4j bLmcXeBqTqaD1qmEv0rK4Rbc/YY+21YxcKitMCDWe1Eij7o6AtehwaylzAnRJho+5B/uOP w28rYaGQd0eGo+AAqV8riHHp0rLhV7L1DGfenff25JAepftQGWKipFznDw2m7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKv7X4CmRzgWc for ; Wed, 20 May 2026 01:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32ff8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 01:28:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 5642fd4b1e44 - stable/15 - ping: fix listing test cases when scapy is not installed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5642fd4b1e44a773a989d3c28869584611da0a54 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 01:28:24 +0000 Message-Id: <6a0d0e38.32ff8.7f07185a@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=5642fd4b1e44a773a989d3c28869584611da0a54 commit 5642fd4b1e44a773a989d3c28869584611da0a54 Author: Alan Somers AuthorDate: 2026-05-01 23:06:35 +0000 Commit: Alan Somers CommitDate: 2026-05-20 01:12:32 +0000 ping: fix listing test cases when scapy is not installed The ATF-python test program was attempting to list test cases that require scapy. But it attempted to import the scapy module before the test cases had been listed, resulting in an ImportError that kyua interpreted as a test program crash. Fix this behavior by handling that ImportError well enough to list test cases, but not run them. If scapy isn't present, Kyua will refuse to run the test cases. But it needs to be able to list them in order to know to skip them. Sponsored by: ConnectWise Reviewed by: maxim Differential Revision: https://reviews.freebsd.org/D56765 (cherry picked from commit 3e845b1090565912375c5578cf0399d27b7fa70c) --- sbin/ping/tests/test_ping.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 3f9a3aecf924..fdf9c875329c 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -12,7 +12,31 @@ from typing import List from typing import Optional logging.getLogger("scapy").setLevel(logging.CRITICAL) -import scapy.all as sc +try: + import scapy.all as sc +except ImportError as e: + # Fake scapy well enough to be able to list test cases + from types import SimpleNamespace + sc = SimpleNamespace( + scapy=SimpleNamespace( + fields=SimpleNamespace( + SourceIPField=0, + ByteEnumField=0, + MultiEnumField=0, + BitField=0, + FlagsField=0, + ByteField=0, + IPField=0, + ShortField=0, + ), + layers=SimpleNamespace( + inet=SimpleNamespace( + DestIPField=0, + ICMPTimeStampField=0, + ) + ) + ) + ) def build_response_packet(echo, ip, icmp, oip_ihl, special):