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,
}
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: bool
ExecutableFile objects are supported.
supports_mutable_file: bool
Supports writing to files and updating file attributes.
supports_get_backing_memory: bool
GetBackingMemory is supported.
supports_remote_dir: bool
Remote directories are supported.
supports_get_token: bool
GetToken is supported.
supports_link_into: bool
Supports fuchsia.io’s LinkInto method.
supports_append: bool
Files can be opened in append mode.
supports_truncate: bool
Files can be truncated (resized).
supported_attributes: NodeAttributesQuery
The 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: bool
Directories support creating files, Rename, Link, and Unlink.
supports_services: bool
Supports services.
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: ResourceDialect> Decode<HarnessConfig, D> for HarnessConfig
impl<D: ResourceDialect> Decode<HarnessConfig, D> for HarnessConfig
Source§impl<D: ResourceDialect> Encode<HarnessConfig, D> for &HarnessConfig
impl<D: ResourceDialect> Encode<HarnessConfig, D> for &HarnessConfig
Source§impl<D: ResourceDialect, T0: Encode<bool, D>, T1: Encode<bool, D>, T2: Encode<bool, D>, T3: Encode<bool, D>, T4: Encode<bool, D>, T5: Encode<bool, D>, T6: Encode<bool, D>, T7: Encode<bool, D>, T8: Encode<NodeAttributesQuery, D>, T9: Encode<bool, D>, T10: Encode<bool, D>> Encode<HarnessConfig, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<D: ResourceDialect, T0: Encode<bool, D>, T1: Encode<bool, D>, T2: Encode<bool, D>, T3: Encode<bool, D>, T4: Encode<bool, D>, T5: Encode<bool, D>, T6: Encode<bool, D>, T7: Encode<bool, D>, T8: Encode<NodeAttributesQuery, D>, T9: Encode<bool, D>, T10: Encode<bool, D>> Encode<HarnessConfig, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
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
.§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 more§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 moreimpl Copy for HarnessConfig
impl Eq for HarnessConfig
impl Persistable for HarnessConfig
impl StructuralPartialEq for HarnessConfig
Auto Trait Implementations§
impl Freeze for HarnessConfig
impl RefUnwindSafe for HarnessConfig
impl Send for HarnessConfig
impl Sync for HarnessConfig
impl Unpin for HarnessConfig
impl UnwindSafe for HarnessConfig
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)