Page MenuHomeFreeBSD

ping: Avoid reporting negative time statistics
ClosedPublic

Authored by jlduran on Feb 10 2023, 12:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 10:24 PM
Unknown Object (File)
Thu, Oct 24, 7:46 PM
Unknown Object (File)
Oct 6 2024, 10:31 PM
Unknown Object (File)
Oct 3 2024, 8:31 PM
Unknown Object (File)
Oct 1 2024, 4:10 PM
Unknown Object (File)
Sep 29 2024, 12:50 PM
Unknown Object (File)
Sep 28 2024, 1:14 AM
Unknown Object (File)
Sep 24 2024, 5:20 AM

Details

Summary

Display a warning when the time goes back.

PR: 192417

Test Plan
  • Adapt the tests to also redact stderr

In the event that this revision is not accepted, the current behavior of printing negative time statistics will be tested as well.

Diff Detail

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

Event Timeline

markj added inline comments.
sbin/ping/ping.c
1219

I'm not sure how I'd interpret "taking countermeasures" as a user. I think the message should either describe what the code is doing ("clamping time to 0"?) or not say anything in particular.

sbin/ping/ping.c
1219

Yes, I do not like that message either. I chose it because there's already a precedent with iputils.
Not saying anything, somehow feels misleading.

jlduran edited the summary of this revision. (Show Details)

Address suggestions:

  • Change the warning message

I can submit a different approach, if preferred, where a negative round trip time is displayed as usual, but the final population standard deviation won't calculate the square root of a negative number. To me, the idea of a negative round trip time is warped, that's why I still prefer this revision.

This revision is now accepted and ready to land.Feb 14 2023, 2:08 PM
This revision was automatically updated to reflect the committed changes.