Skip to content

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

Description

@bcmills

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions