From nobody Wed Aug 5 02:21:59 2026 X-Original-To: dev-commits-src-all@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 4hFDgq6nsTz6JNjD for ; Wed, 05 Aug 2026 02:21:59 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hFDgq4KhGz4L5Y for ; Wed, 05 Aug 2026 02:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785896519; 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=y8N3L+H8N2A/TJxmCWfJ/RFvOd+SsUl4olnQ+j+UNoU=; b=eTiWknHvKoJTjIjDHagkSHINgCHTPnEMG4RDMBYhVjPCh+y8p0Md+giHGWpc4dx8FII9Et 4+e4QQAt4AQO3EqqRriC74QIIaLLJ6YtcE6wGW/Qnhiokkfj0hq9HtcalNhvQnYLjV/rFD 3Nbi2AcJTAML5XlEcX/Ts9Ih+v0+3JeFSltV7BxgdRdWp9e0/55Xybat8PeLkR/q+ilKLq oHmf8ZudmCx1rZRRcsV19TS8HNv9xlbygmNohWaku9JMnhqfN/75UDWVkNkceeZshyf+Ge cdDMVOixY8JMMErs/9jZBBkTLdYzaJw4U6JJ04BSlNuNZutflopjb+4k124lcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785896519; a=rsa-sha256; cv=none; b=ZbszMsUPiKy4QOjdW+XTEa3AfPBeNydQEMsM2kBEcJhiwAprNLJf1FIjb8zM7/rYCr9vIR CshonLFlSNaej7aJu2OlPYbqpo7Tcedas45yBOuDQtNubKKbMfnOb5yrPPkolAQcIDK7PL Bm3JekyCQDJE3xnaEyYYIVjK76eg9dh3WFzz66EvDyZ4XfbhI7Ux1NfWBooGucjlO6Jm7B 3+5X08ACi+6M9vkjahOMmC+vEXXb4C0ih2SeuAvQeVWjdhoyJzSxvzV6EwTnRzgxoDuhS7 Oiz9v9kjqa4PfLBNTKNIWb7DC7hMwGzggfKI8jfzj5Uzx5LXppKEPYpW3s17cQ== 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=1785896519; 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=y8N3L+H8N2A/TJxmCWfJ/RFvOd+SsUl4olnQ+j+UNoU=; b=JRlYCqJQxmx4lEho04RuAJ17g4OcY6KYMre/3e2EdPENQDakRXKPlVfBRFUriKJKdSb42N QX6K3oFADopiZBNiJXR6EmT3ocerXSX2/l+tQyv7mhaLjYpoJXmxWXBzSbaT8mTEP529IZ yF+3KrfoypKVaHvo5DnBKpCSGszWJyDr+XEX+UpVzxTGmTRCs76e+i9IsT5wXPeRe0c/t3 qiu+YoRIiwgEq5W/618zCo+QNG5gcynEMhVx/V6Di8zBhnPvYBjEiOyP1RWDG/0fZQB0vA Coxbe01NE8yjHFxyluZ+0CVNDm7D3YBuu3EW2qCvS4IFKaYiwyX7hzVBe32rhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hFDgq3P1Mz1CjR for ; Wed, 05 Aug 2026 02:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bfa5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 05 Aug 2026 02:21:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c3be3a784c2b - stable/14 - ping: fix listing test cases when scapy is not installed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: c3be3a784c2b16b18ac8322dbf7863587f278bb9 Auto-Submitted: auto-generated Date: Wed, 05 Aug 2026 02:21:59 +0000 Message-Id: <6a729e47.3bfa5.7d0e6651@gitrepo.freebsd.org> The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c3be3a784c2b16b18ac8322dbf7863587f278bb9 commit c3be3a784c2b16b18ac8322dbf7863587f278bb9 Author: Alan Somers AuthorDate: 2026-05-01 23:06:35 +0000 Commit: Alan Somers CommitDate: 2026-08-05 02:18:14 +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 60ddd3d751bf..88164c2ab816 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):