Page MenuHomeFreeBSD

ping: Avoid reporting negative time statistics
ClosedPublic

Authored by jlduran_gmail.com on Feb 10 2023, 12:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 20, 11:46 PM
Unknown Object (File)
Fri, Sep 20, 12:20 PM
Unknown Object (File)
Aug 21 2024, 3:12 PM
Unknown Object (File)
Aug 21 2024, 3:15 AM
Unknown Object (File)
Aug 5 2024, 2:54 AM
Unknown Object (File)
Jul 3 2024, 8:51 AM
Unknown Object (File)
Jun 27 2024, 1:53 AM
Unknown Object (File)
Jun 13 2024, 7:10 PM

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_gmail.com 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.