pub struct TestHarness {
pub proxy: TestHarnessProxy,
pub config: HarnessConfig,
pub dir_rights: Rights,
pub file_rights: Rights,
pub executable_file_rights: Rights,
}
Expand description
Helper struct for connecting to an io1 test harness and running a conformance test on it.
Fields§
§proxy: TestHarnessProxy
FIDL proxy to the io1 test harness.
config: HarnessConfig
Config for the filesystem.
dir_rights: Rights
All io_test::Directory
rights supported by the filesystem.
file_rights: Rights
All io_test::File
rights supported by the filesystem.
executable_file_rights: Rights
All io_test::ExecutableFile
rights supported by the filesystem.
Implementations§
Source§impl TestHarness
impl TestHarness
Sourcepub async fn new() -> TestHarness
pub async fn new() -> TestHarness
Connects to the test harness and returns a TestHarness
struct.
Sourcepub fn get_directory(
&self,
entries: Vec<DirectoryEntry>,
flags: Flags,
) -> DirectoryProxy
pub fn get_directory( &self, entries: Vec<DirectoryEntry>, flags: Flags, ) -> DirectoryProxy
Creates a fio::DirectoryProxy
with the given root directory structure.
Sourcepub async fn open_service_directory(&self) -> DirectoryProxy
pub async fn open_service_directory(&self) -> DirectoryProxy
Helper function which gets service directory from the harness as a fio::DirectoryProxy
.
Requires that the harness supports service directories, otherwise will panic.
Sourcepub fn supported_file_abilities(&self) -> Abilities
pub fn supported_file_abilities(&self) -> Abilities
Returns the abilities io_test::File
objects should have for the harness.
Sourcepub fn supported_dir_abilities(&self) -> Abilities
pub fn supported_dir_abilities(&self) -> Abilities
Returns the abilities io_test::Directory
objects should have for the harness.
Sourcepub fn supports_mutable_attrs(&self) -> bool
pub fn supports_mutable_attrs(&self) -> bool
Returns true if the harness supports at least one mutable attribute, false otherwise.
NOTE: To allow testing both the io1 SetAttrs and io2 UpdateAttributes methods, harnesses
that support mutable attributes must support fio::NodeAttributesQuery::CREATION_TIME
and fio::NodeAttributesQuery::MODIFICATION_TIME
.