Page MenuHomeFreeBSD

ping: fix listing test cases when scapy is not installed
ClosedPublic

Authored by asomers on May 1 2026, 11:09 PM.
Tags
None
Referenced Files
F159696737: D56765.diff
Wed, Jun 17, 4:12 AM
Unknown Object (File)
Thu, Jun 4, 2:06 PM
Unknown Object (File)
Tue, Jun 2, 10:17 PM
Unknown Object (File)
Tue, Jun 2, 1:32 AM
Unknown Object (File)
Tue, Jun 2, 1:28 AM
Unknown Object (File)
Mon, Jun 1, 10:19 PM
Unknown Object (File)
Mon, Jun 1, 10:15 PM
Unknown Object (File)
Sun, May 31, 3:07 PM
Subscribers

Details

Summary

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
interprets 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
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I don't really know python good enough to review this but the idea sounds good to me.

In fact, I found it frustrating how much additional stuff I need to install to test ping(8).

This revision is now accepted and ready to land.May 2 2026, 2:54 AM
This revision was landed with ongoing or failed builds.May 2 2026, 3:21 PM
This revision was automatically updated to reflect the committed changes.