<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sbin/ping/tests/test_ping.py, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-06-30T13:07:59Z</updated>
<entry>
<title>ping: Fix bell char ordering in -A test cases</title>
<updated>2026-06-30T13:07:59Z</updated>
<author>
<name>Siva Mahadevan</name>
<email>siva@FreeBSD.org</email>
</author>
<published>2026-06-26T12:22:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f7f916d755fe5b48a2a68a937beea770b7bafa95'/>
<id>urn:sha1:f7f916d755fe5b48a2a68a937beea770b7bafa95</id>
<content type='text'>
Previously, these tests expected the bell chars to arrive
before the initial status line. This appeared to be ok because
ping(8) incorrectly mixed unbuffered and buffered writes by using
printf(3) calls for the initial status, but direct write(2) calls
for the bell chars. 141bb85798 revealed that the test's assertions
only passed because the buffered writes did not get flushed before
the direct writes in the test runs.

8bda488114f3 fixed ping(8) to use POSIX stdio buffered writes
in all cases and guarantee a deterministic output ordering to stdout
observers. This patch fixes the test to match the correct ordering.

Reviewed by:	des
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Revert "ping/tests: expect bell chars from stderr after initial status"</title>
<updated>2026-06-30T13:07:47Z</updated>
<author>
<name>Siva Mahadevan</name>
<email>siva@FreeBSD.org</email>
</author>
<published>2026-06-30T13:00:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7ac9995a062ff9f78b634fe403e6a313f5637945'/>
<id>urn:sha1:7ac9995a062ff9f78b634fe403e6a313f5637945</id>
<content type='text'>
This reverts commit 5b8c28adb829b50fb8ac065637fa99f717858bab.

The commit message was wrong.

Reported by:	des
</content>
</entry>
<entry>
<title>ping/tests: expect bell chars from stderr after initial status</title>
<updated>2026-06-26T22:46:09Z</updated>
<author>
<name>Siva Mahadevan</name>
<email>siva@FreeBSD.org</email>
</author>
<published>2026-06-26T12:22:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5b8c28adb829b50fb8ac065637fa99f717858bab'/>
<id>urn:sha1:5b8c28adb829b50fb8ac065637fa99f717858bab</id>
<content type='text'>
After 141bb85798 and 8bda488114f3, ping(8) first writes and flushes the
initial status to stdout, then writes notification bell characters to stderr.

This patch corrects the expected order of the output to stdout and stderr.
This is a temporary fix; the test should be rewritten to separate the output
streams and run expectations on each individually.

Reviewed by:	des
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>ping: fix listing test cases when scapy is not installed</title>
<updated>2026-05-02T15:20:16Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2026-05-01T23:06:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e845b1090565912375c5578cf0399d27b7fa70c'/>
<id>urn:sha1:3e845b1090565912375c5578cf0399d27b7fa70c</id>
<content type='text'>
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
MFC after:		2 weeks
Reviewed by:		maxim
Differential Revision:	https://reviews.freebsd.org/D56765
</content>
</entry>
<entry>
<title>ping tests: Run tests unprivileged inside a vnet</title>
<updated>2024-11-05T03:07:32Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@FreeBSD.org</email>
</author>
<published>2024-11-05T03:00:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5797a03fe8a7c3355a727aaaea803ee1f42d106b'/>
<id>urn:sha1:5797a03fe8a7c3355a727aaaea803ee1f42d106b</id>
<content type='text'>
In order to create vnet jails, atf_python needs root privileges.
However, once the vnet is created, its privileges inside the vnet can be
demoted, as these tests should not require root in order to pass.

Reviewed by:	markj
Approved by:	emaste (mentor)
Fixes:	4efaf43c6fa7 ("ping: Require root user for pytests")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42175
</content>
</entry>
<entry>
<title>ping tests: Silence deprecation warnings</title>
<updated>2024-11-05T03:07:03Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@FreeBSD.org</email>
</author>
<published>2024-11-05T03:04:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8b13cb9d654c985534d24a09ec5dab02cc4dea6e'/>
<id>urn:sha1:8b13cb9d654c985534d24a09ec5dab02cc4dea6e</id>
<content type='text'>
Declare some regex patterns as a raw string by prepending `r`.

Reviewed by:	markj
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D42174
</content>
</entry>
<entry>
<title>ping: tests: Align with Scapy defaults</title>
<updated>2024-11-05T02:48:34Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@FreeBSD.org</email>
</author>
<published>2024-11-05T02:48:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4859030ef193688153f490915794ae9ab77f012b'/>
<id>urn:sha1:4859030ef193688153f490915794ae9ab77f012b</id>
<content type='text'>
Align some of pinger() defaults with Scapy to facilitate debugging when
printing packets.

No functional change intended.

Reviewed by:	emaste, kp
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D47159
</content>
</entry>
<entry>
<title>ping: tests: Cleanup IPOption()s</title>
<updated>2024-11-05T02:46:45Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@FreeBSD.org</email>
</author>
<published>2024-11-05T02:46:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd'/>
<id>urn:sha1:2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd</id>
<content type='text'>
Scapy now only accepts known options with IPOption(), so our unknown
option must be passed raw.

While here, prefer the named options for EOL and NOP.

Reviewed by:	emaste, kp
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D47160
</content>
</entry>
<entry>
<title>ping tests: fix for scapy-2.6.0</title>
<updated>2024-10-16T15:25:57Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2024-10-16T07:57:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2926c2594249f64fecbbdcb0b0b9a3591931ab04'/>
<id>urn:sha1:2926c2594249f64fecbbdcb0b0b9a3591931ab04</id>
<content type='text'>
Scapy 2.6.0 now appears to parse the IPOption during construction, and it then
gets confused at a single-byte option. IP Options typically contain at least a 1
byte type and 1 byte length. Avoid this by just returning the raw bytes, rather
than an IPOption object.

MFC after:	1 week
Reviewed by:	Jose Luis Duran &lt;jlduran@gmail.com&gt;
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47151
</content>
</entry>
<entry>
<title>ping tests: Fix test on i386 platforms</title>
<updated>2023-10-19T13:35:39Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@gmail.com</email>
</author>
<published>2023-10-17T11:35:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=24fe0cb84d71a0e9d648c43f92b5c3a730c3855a'/>
<id>urn:sha1:24fe0cb84d71a0e9d648c43f92b5c3a730c3855a</id>
<content type='text'>
Actually use INT_MAX (0x7fffffff), not UINT_MAX (0xffffffff) to avoid
overflowing time_t and missing the test.

Reported by:	Jenkins
Reviewed by:	markj
Fixes:		5b8af90fe332 ("ping: Add ATF-Python tests")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/874
Differential Revision: https://reviews.freebsd.org/D42268
</content>
</entry>
</feed>
