-
Notifications
You must be signed in to change notification settings - Fork 5.3k
fix ping tests on unsupported unix platforms #65060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis is recent regression I bump to while running tests on FreeBSD. #64625 assumes we would use This PR generally flips the condition and it assumes we would use
|
|
@wfurt, some network areas are quite involved and I didn't had enough time, so I previously asked community (#illumos channel on IRC) for help to port System.Net.* namespaces. The difference in /proc (we rely on procfs heavily for network statistics) alone is quite significant: on Linux it has text files that we conveniently read with System.IO.File.ReadAllLines/Text etc., whereas on illumos/Solaris it has binary files that requires read(struct)), so it is a large workitem for someone well-familiar with low-level networking APIs (that's not me 🙂). However, for ping utility, the manpage https://illumos.org/man/1m/ping says there are two forms. The first form supports timeout but not the count ( # First form: with default (1 sec) timeout. simple "alive or not" reply
$ ping github.com
# First form: with specified timeout of 8 seconds
$ ping github.com 8
# Second form: send indefinite number of packets, with ttl 2 intervals
# (default interval is 1 sec, can be set with -I with min value 0.011 sec):
# (default size is 56 bytes and shown in output as 64 (56+8)):
$ ping -s -t 20 github.com
# Second form: send 4 packets of size 40 bytes (32 +8 which it will add), with minimum interval 0.011 sec:
$ ping -s -t 20 -I 0.011 github.com 32 4
I think once System.Net is ported to illumos/Solaris, with capabilities queries, this path will work as well. |
rzikm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
LGTM. |
|
thanks for update @am11. When the time comes we may have more updates in production code that handles arguments. |
This is recent regression I bump to while running tests on FreeBSD.
#64625 assumes we would use
pingutility only on Linux.But that is how it works on pretty much on all UNIX like systems and macOS(like) is rare and recent exception.
(event if the list of actual variations is annoyingly long)
This PR generally flips the condition and it assumes we would use
pingunless we know we don't have to.That should make it work again for Solaris(like) and (Free)BSD(like) OSes.
cc: @am11 @Thefrank