package dut
import "gvisor.dev/gvisor/test/packetimpact/dut"
Package dut provides common definitions and utilities to be shared by DUTs.
Index ¶
Constants ¶
const ( // PosixServerPort is the port the posix server should listen on. PosixServerPort = 54321 // CtrlIface is the command switch name for passing name of the control interface. CtrlIface = "ctrl_iface" // TestIface is the command switch name for passing name of the test interface. TestIface = "test_iface" )
Functions ¶
func Run ¶
Run is the provided function that calls dut's Bootstrap and Cleanup methods and returns the DUT information to the parent through the pipe.
func WaitForServer ¶
WaitForServer waits for a pattern to occur in posix_server's logs.
Types ¶
type DUT ¶
type DUT interface { // Bootstrap starts a DUT and returns the collected DUTInfo and a function // for the caller to call to wait for the completion of the DUT. Bootstrap(ctx context.Context) (testbench.DUTInfo, func() error, error) // Cleanup stops the DUT and cleans up the resources being used. Cleanup() }
DUT is an interface for different platforms of DUTs.
type Ifaces ¶
type Ifaces struct { // Ctrl is the name of the control interface. Ctrl string // Test is the name of the test interface. Test string }
Ifaces describe the names of the interfaces on DUT.
func Init ¶
Init puts the current process into the target network namespace, the user of this library should call this function in the beginning.
Source Files ¶
dut.go
Directories ¶
Path | Synopsis |
---|---|
test/packetimpact/dut/linux | Package linux provides utilities specific to bringing up linux DUTs. |
test/packetimpact/dut/native | The native binary is used to bring up a native linux DUT. |
test/packetimpact/dut/runsc | The devid binary is used to get the device ID in the runsc container. |
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 18 minutes ago –
Tools for package owners.