Expand description
Provides utilities for Netstack integration tests.
Modules§
- constants
- Useful constants for tests.
- devices
- Utilities for interacting with devices during integration tests.
- dhcpv4
- Utilities for interacting with DHCPv4 client/server during integration tests.
- interfaces
- Provides utilities for using
fuchsia.net.interfaces
andfuchsia.net.interfaces.admin
in Netstack integration tests. - ndp
- Helpers for tests involving the Neighbor Discovery Protocol.
- nud
- Useful NUD functions for tests.
- packets
- Packet parsing helpers.
- ping
- Ping utilities.
- realms
- Provides utilities for test realms.
Constants§
- ASYNC_
EVENT_ CHECK_ INTERVAL - The time to wait between two consecutive checks of an event.
- ASYNC_
EVENT_ NEGATIVE_ CHECK_ TIMEOUT - Extra time to use when waiting for an async event to not occur.
- ASYNC_
EVENT_ POSITIVE_ CHECK_ TIMEOUT - Extra time to use when waiting for an async event to occur.
Functions§
- annotate
- Wraps
fut
so that it printsevent_name
and the caller’s location to stderr everyinterval
untilfut
completes. - get_
child_ component_ event_ matcher - Gets an event matcher for
component_moniker
inrealm
. - get_
component_ moniker - Gets the moniker of a component in a test realm, relative to the root of the dynamic collection in which it is running.
- get_
component_ stopped_ event_ stream - Gets a component event stream yielding component stopped events.
- get_
deprecated_ netstack2_ inspect_ data - Read an Inspect hierarchy and filter it down to properties of interest from the diagnostics
directory of Netstack2. For any other component, please use
get_inspect_data
, this function doesn’t apply to any other component and won’t work. - get_
inspect_ data - Gets inspect data in realm.
- get_
inspect_ property - Like
get_inspect_data
but returns a single property matched byproperty_selector
. - pause_
fake_ clock - Pauses the fake clock in the given realm.
- setup_
network - Sets up a realm with a network with no required services.
- setup_
network_ with - Sets up a realm with required services and a network used for tests requiring manual packet inspection and transmission.
- sleep
- Asynchronously sleeps for specified
secs
seconds. - try_all
- Returns
true
if the stream only yieldstrue
. - try_any
- Returns
true
once the stream yields atrue
. - wait_
for_ component_ stopped - Like
wait_for_component_stopped_with_stream
but retrieves an event stream for the caller. - wait_
for_ component_ stopped_ with_ stream - Waits for a
stopped
event to be emitted for a component in a test realm.
Type Aliases§
- Result
- An alias for
Result<T, anyhow::Error>
.