Title: Test-Connect/Ping Tests forcing IPv4 is unreliable - assumes GetHostEntry address list is in a specific order · Issue #7576 · PowerShell/PowerShell · GitHub
Open Graph Title: Test-Connect/Ping Tests forcing IPv4 is unreliable - assumes GetHostEntry address list is in a specific order · Issue #7576 · PowerShell/PowerShell
X Title: Test-Connect/Ping Tests forcing IPv4 is unreliable - assumes GetHostEntry address list is in a specific order · Issue #7576 · PowerShell/PowerShell
Description: The two tests that verify Test-Connection with IPv4 implicit/explicit options assume that GetHostEntry() returns the AddressList with the IPv4 address as the first entry. I'm seeing, on Ubuntu 18.04, that the order is reversed, the IPv6 ...
Open Graph Description: The two tests that verify Test-Connection with IPv4 implicit/explicit options assume that GetHostEntry() returns the AddressList with the IPv4 address as the first entry. I'm seeing, on Ubuntu 18.0...
X Description: The two tests that verify Test-Connection with IPv4 implicit/explicit options assume that GetHostEntry() returns the AddressList with the IPv4 address as the first entry. I'm seeing, on Ubuntu ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7576
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test-Connect/Ping Tests forcing IPv4 is unreliable - assumes GetHostEntry address list is in a specific order","articleBody":"The two tests that verify Test-Connection with IPv4 implicit/explicit options assume that GetHostEntry() returns the AddressList with the IPv4 address as the first entry.\r\n\r\nI'm seeing, on Ubuntu 18.04, that the order is reversed, the IPv6 address is reported first.\r\n\r\nThe test should be updated by searching the IPHostEntry.AddressList for the entry with AddressFamily -eq InterNetwork.\r\n\r\nThe failure also occurs on Cent0S 7\r\n\r\nActually, this test has a number of issues:\r\n\r\n1: It assumes the address list returned by GetHostEntry and GetHostAddresses have a predictable order.\r\nThis means that $var-\u003eAddressList[0] is not consistent across OS installations and is not guaranteed to be consistent across runs; at least the API doesn't indicate such.\r\n\r\nLikely the best solution for this is to query both API's in BeforeAll, build a lookup table and chagne the Should statements to verify the IP address(es) Test-Connection reports are in the the associated table.\r\n\r\n2: It assumes that localhost has an IPV6 address (::1).\r\nUbuntu 18.04, not domain joined, does not.\r\n\r\nThe test 'Force IPv6' should be skipped for this case. Querying in BeforeAll and checking the IP address list is sufficient.\r\n\r\n3: It assumes that GetHostByName('localhost') returns the FQDN name.\r\nOn the same, clean Ubuntu 18.04 system, the return value is 'localhost'\r\n\r\nThe test 'ResolveDestination for address' is a NOP for this case.\r\n\r\n4: $targetName is used as the starting name in a number of tests; it is localhost\r\nThis is a minor note but it makes the tests that reference it misleading. Using 'localhost' directly would clarify this.\r\n","author":{"url":"https://github.com/dantraMSFT","@type":"Person","name":"dantraMSFT"},"datePublished":"2018-08-20T17:36:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7576/PowerShell/issues/7576"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:283dc239-0c09-bd4c-8778-9ce5c66c0d52 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA1A:2EB536:FBD7B:155641:6A558ADD |
| html-safe-nonce | 9b76836a9eb19b72689ad138cfa14b52b1f8487b6c4234f76a4d63a63fdeba1c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTFBOjJFQjUzNjpGQkQ3QjoxNTU2NDE6NkE1NThBREQiLCJ2aXNpdG9yX2lkIjoiODM0MDcxMTYxNzQyMDY5MjE4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2df4d73bf01582d32b4ade8eb8fa0da398e071a4e249430e3517405f00bbf345 |
| hovercard-subject-tag | issue:352229901 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/7576/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d1c359d96b636a622329c02f12346482503f87b2353d9eb69633046701bbd49a/PowerShell/PowerShell/issues/7576 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d1c359d96b636a622329c02f12346482503f87b2353d9eb69633046701bbd49a/PowerShell/PowerShell/issues/7576 |
| og:image:alt | The two tests that verify Test-Connection with IPv4 implicit/explicit options assume that GetHostEntry() returns the AddressList with the IPv4 address as the first entry. I'm seeing, on Ubuntu 18.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dantraMSFT |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3215163789b3dc58dba97bd78a30c20c949f477f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width