Page MenuHomeFreeBSD

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

Authored by asomers on Fri, May 1, 11:09 PM.
Tags
None
Referenced Files
F156932025: D56765.id177026.diff
Sun, May 17, 11:09 AM
F156918598: D56765.id177041.diff
Sun, May 17, 8:45 AM
F156892469: D56765.id.diff
Sun, May 17, 3:26 AM
Unknown Object (File)
Sat, May 16, 11:31 AM
Unknown Object (File)
Tue, May 12, 6:53 AM
Unknown Object (File)
Mon, May 11, 10:26 PM
Unknown Object (File)
Mon, May 11, 8:43 PM
Unknown Object (File)
Mon, May 11, 7:39 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.Sat, May 2, 2:54 AM
This revision was landed with ongoing or failed builds.Sat, May 2, 3:21 PM
This revision was automatically updated to reflect the committed changes.