Page MenuHomeFreeBSD

ping: Flush stdout after printing initial status
ClosedPublic

Authored by des on Tue, Jun 23, 8:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 21, 9:33 AM
Unknown Object (File)
Mon, Jul 20, 2:05 AM
Unknown Object (File)
Thu, Jul 16, 11:56 PM
Unknown Object (File)
Thu, Jul 16, 4:35 AM
Unknown Object (File)
Thu, Jul 16, 2:33 AM
Unknown Object (File)
Wed, Jul 15, 11:25 AM
Unknown Object (File)
Wed, Jul 15, 7:27 AM
Unknown Object (File)
Wed, Jul 15, 7:27 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.Tue, Jun 23, 8:33 AM
This revision is now accepted and ready to land.Tue, Jun 23, 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.