Page MenuHomeFreeBSD

ping: Flush stdout after printing initial status
ClosedPublic

Authored by des on Jun 23 2026, 8:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 10, 9:40 AM
Unknown Object (File)
Mon, Aug 10, 12:37 AM
Unknown Object (File)
Mon, Aug 10, 12:36 AM
Unknown Object (File)
Sun, Aug 9, 3:48 AM
Unknown Object (File)
Sun, Aug 9, 1:59 AM
Unknown Object (File)
Sat, Aug 8, 6:39 PM
Unknown Object (File)
Sat, Aug 8, 5:19 PM
Unknown Object (File)
Sat, Aug 8, 9:25 AM
Subscribers

Diff Detail

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

Event Timeline

des requested review of this revision.Jun 23 2026, 8:33 AM
This revision is now accepted and ready to land.Jun 23 2026, 2:09 PM
This revision was automatically updated to reflect the committed changes.

This broke a couple test cases in test_ping.py https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28886/testReport/ . Here's the fix (EDIT v2):

diff --git i/sbin/ping/tests/test_ping.py w/sbin/ping/tests/test_ping.py
index fdf9c875329c..88164c2ab816 100644
--- i/sbin/ping/tests/test_ping.py
+++ w/sbin/ping/tests/test_ping.py
@@ -431,8 +431,8 @@ class TestPing(SingleVnetTestTemplate):
                 "args": "ping -A -c3 192.0.2.2",
                 "returncode": 2,
                 "stdout": """\
-\x07\x07PING 192.0.2.2 (192.0.2.2): 56 data bytes
-
+PING 192.0.2.2 (192.0.2.2): 56 data bytes
+\x07\x07
 --- 192.0.2.2 ping statistics ---
 3 packets transmitted, 0 packets received, 100.0% packet loss
 """,
@@ -463,8 +463,8 @@ class TestPing(SingleVnetTestTemplate):
                 "args": "ping -A -c3 2001:db8::2",
                 "returncode": 2,
                 "stdout": """\
-\x07\x07PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2
-
+PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2
+\x07\x07
 --- 2001:db8::2 ping statistics ---
 3 packets transmitted, 0 packets received, 100.0% packet loss
 """,

Can I go ahead and commit this patch?

Can I go ahead and commit this patch?

You don't need my permission, but if you want me to review it you'll have to post it properly.