Skip to content
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

x/net/nettest: TestableAddress is not consistent with TestableNetwork #59716

Open
bcmills opened this issue Apr 19, 2023 · 0 comments
Open

x/net/nettest: TestableAddress is not consistent with TestableNetwork #59716

bcmills opened this issue Apr 19, 2023 · 0 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 19, 2023

What did you do?

Run the following program (https://go.dev/play/p/rwXVU67MVUC?v=gotip):

package main

import (
	"golang.org/x/net/nettest"
)

func main() {
	println(nettest.TestableNetwork("ip6"))
	println(nettest.TestableAddress("ip6", "::1"))
}

What did you expect to see?

Consistent answers: TestableAddress for an address on a given network should only be true if TestableNetwork is also true for that network.

What did you see instead?

false
true

Specifically, today TestableAddress always returns true for networks that are not one of unix, unixgram, or unixpacket.

(attn @neild @ianlancetaylor)

@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2023
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants