vsock: github.com/mdlayher/vsock/internal/vsutil Index | Files

package vsutil

import "github.com/mdlayher/vsock/internal/vsutil"

Package vsutil provides added functionality for package vsock-internal use.

Index

Package Files

vsutil.go

func Accept Uses

func Accept(l net.Listener, timeout time.Duration) (net.Conn, error)

Accept blocks until a single connection is accepted by the net.Listener.

If timeout is non-zero, the listener will be closed after the timeout expires, even if no connection was accepted.

func IsHypervisor Uses

func IsHypervisor(t *testing.T) bool

IsHypervisor detects if this machine is a hypervisor by determining if /dev/vsock is available, and then if its context ID matches the one assigned to hosts.

func SkipDeviceError Uses

func SkipDeviceError(t *testing.T, err error)

SkipDeviceError skips this test if err is related to a failure to access the /dev/vsock device.

func SkipHostIntegration Uses

func SkipHostIntegration(t *testing.T)

SkipHostIntegration skips this test if this machine is a host and cannot perform a given test.

Package vsutil imports 5 packages (graph). Updated 2019-05-09. Refresh now. Tools for package owners.