HomeFreeBSD

ping: fix listing test cases when scapy is not installed

Description

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)

Details

Provenance
asomersAuthored on May 1 2026, 11:06 PM
Reviewer
maxim
Differential Revision
D56765: ping: fix listing test cases when scapy is not installed
Parents
rG3aab0373ddb6: nfs_clsubs.c: Fix ncl_getcookie() when "pos" is negative
Branches
Unknown
Tags
Unknown