From nobody Wed May 20 01:28:24 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 4gKv7d5kssz6dtFZ for ; Wed, 20 May 2026 01:28:29 +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 4gKv7d50c9z4NZN for ; Wed, 20 May 2026 01:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779240509; 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=igJjqcYDWlYrYxLBofBu+Yu0Jf1FW70CNUw5ao4EWzCHlcCSbaHwMukzTIoJOVjKj1vanw U9kzm4RHDclAzS0mLL2/TBjggvZFhBz5sGKzoah+sZdzehsawLRtx0dJ2Z3ln9YdgV61aU mLatWeMyEFm97cXkadeqpWYDl3PWb2zkX2zYs4vfPDjzArku+slpurtKlST9dgspMmDO65 hPxksFjihofrX55gScLsicjXlns4NcXitXmjNV/tBjDwHgRgrp/i9BgJY5cL0ciwBhoG2E RRMnIdAMQD7FvxIr45ETmTJwGqfcL+T3mu7/AMGuI6n9RIJ6b1b1ObG/rZfUEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779240509; a=rsa-sha256; cv=none; b=I/fzMJLTjv+w2H0di8AKzGsT/rarpJTIPlk/RuXmIhK4Y2Lh/Dsd9A371OqOi3r4flacHw DDSu/1rO1h/+R8/VuisSMlRLZl6w/to5ApdAXH24yoRClMup/tUiTcCny/GyKM90xb9MJY BOy9YeU1OpngB4GCMDBhPYpFJFXbPvxQbEtNhHw33TpzXGG/dw/M9q5uOv0DWolcwlpvLt Bz1tJ5YN1TwYpVRIgacD6rF5uFKvMNh20tOokf5s6tEOnhtG41G3hpoBadGhdNSdaIfLBY qULfxGrkiD2xxsYavqzvy+iXyvRelD9GE7u80adJh1g0A+J4r11JAXBCILQKHw== 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=1779240509; 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=T5Sn46mhvFZzCkQLmMwEtJwDoi7PAmDV1LHHtSUHdghmIYbauIlSWGp9Cm9RYzrzxBlcDm k4hiaVNs3wHNfE4hLIbAUMYI5ZhTHM21CNAbH9jq0HGz1HPQ3OfdEKt3loNVGQLjw5sJvy ALA8Z1XQk86lion146M4TaNOhOzQs6V9lLimaSZhgLK96SBDmPhOvE3oxRUwpA9h2pS8OS 4AMicuBqUhrXOuom4/pz4g0LEJ1uoWcgvjgZd2IvjFWV33CWM8gQt2YlQOUhVJm/Jw7AwT ow84ETbQufQXF2MXsWqZhCkHMToT/RhKCokJndUonOFrfOooya2ywUNrtakvqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKv7d4Zl1zglK for ; Wed, 20 May 2026 01:28:29 +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: 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/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):