pub struct HarnessConfig {
pub supports_executable_file: bool,
pub supports_mutable_file: bool,
pub supports_get_backing_memory: bool,
pub supports_remote_dir: bool,
pub supports_get_token: bool,
pub supports_link_into: bool,
pub supports_append: bool,
pub supports_truncate: bool,
pub supported_attributes: NodeAttributesQuery,
pub supports_modify_directory: bool,
pub supports_services: bool,
pub supports_unnamed_temporary_file: bool,
}Expand description
Conformance test harnesses will implement this protocol to setup its
associated filesystem servers with the described directory layout,
allowing their implementation of fuchsia.io and fuchsia.io2 protocols
to be verified by a common test suite.
Different test cases will not interact with one another during the conformance test, and only one test case will be active at a time per tested filesystem. So it is possible to host all cases as different sub-directories under a common filesystem instance, to simplify the lifecycle and implementation.
If a test case has mutable bits, each method call should be implemented to obtain the directory in its original state. In other words, repeated test case set up should “as-if” yield new directories.
See src/storage/conformance/README.md for an overview of io conformance
testing.
HarnessConfig lets the test harness modulate the set of expected outcomes and
behaviors validated by the test suite, by declaring specific properties
about the filesystem implementation. For example, setting [ImmutableFile]
to true informs the test suites that files hosted by this harness do not
support mutation.
Fields§
§supports_executable_file: boolExecutableFile objects are supported.
supports_mutable_file: boolSupports writing to files and updating file attributes.
supports_get_backing_memory: boolGetBackingMemory is supported.
supports_remote_dir: boolRemote directories are supported.
supports_get_token: boolGetToken is supported.
supports_link_into: boolSupports fuchsia.io’s LinkInto method.
supports_append: boolFiles can be opened in append mode.
supports_truncate: boolFiles can be truncated (resized).
supported_attributes: NodeAttributesQueryThe set of attributes the filesystem supports. If mutable attributes are reported, the
harness must support [fuchsia.io/Node.SetAttr] and [fuchsia.io/Node.UpdateAttributes].
supports_modify_directory: boolDirectories support creating files, Rename, Link, and Unlink.
supports_services: boolSupports services.
supports_unnamed_temporary_file: boolSupports unnamed temporary files.
Trait Implementations§
Source§impl Clone for HarnessConfig
impl Clone for HarnessConfig
Source§fn clone(&self) -> HarnessConfig
fn clone(&self) -> HarnessConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HarnessConfig
impl Debug for HarnessConfig
Source§impl<D> Decode<HarnessConfig, D> for HarnessConfigwhere
D: ResourceDialect,
impl<D> Decode<HarnessConfig, D> for HarnessConfigwhere
D: ResourceDialect,
Source§fn new_empty() -> HarnessConfig
fn new_empty() -> HarnessConfig
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<HarnessConfig, D> for &HarnessConfigwhere
D: ResourceDialect,
impl<D> Encode<HarnessConfig, D> for &HarnessConfigwhere
D: ResourceDialect,
Source§impl Hash for HarnessConfig
impl Hash for HarnessConfig
Source§impl Ord for HarnessConfig
impl Ord for HarnessConfig
Source§fn cmp(&self, other: &HarnessConfig) -> Ordering
fn cmp(&self, other: &HarnessConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for HarnessConfig
impl PartialEq for HarnessConfig
Source§impl PartialOrd for HarnessConfig
impl PartialOrd for HarnessConfig
Source§impl TypeMarker for HarnessConfig
impl TypeMarker for HarnessConfig
Source§type Owned = HarnessConfig
type Owned = HarnessConfig
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for HarnessConfig
impl ValueTypeMarker for HarnessConfig
Source§type Borrowed<'a> = &'a HarnessConfig
type Borrowed<'a> = &'a HarnessConfig
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<HarnessConfig as TypeMarker>::Owned,
) -> <HarnessConfig as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<HarnessConfig as TypeMarker>::Owned, ) -> <HarnessConfig as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.