Struct fixture::sys::linux::TestVmSys

source ·
pub struct TestVmSys {
    pub test_dir: TempDir,
    pub from_guest_reader: Arc<Mutex<StreamDeserializer<'static, IoRead<BufReader<File>>, DelegateMessage>>>,
    pub to_guest: Arc<Mutex<File>>,
    pub control_socket_path: PathBuf,
    pub process: Option<Child>,
}

Fields§

§test_dir: TempDir

Maintain ownership of test_dir until the vm is destroyed.

§from_guest_reader: Arc<Mutex<StreamDeserializer<'static, IoRead<BufReader<File>>, DelegateMessage>>>§to_guest: Arc<Mutex<File>>§control_socket_path: PathBuf§process: Option<Child>

Implementations§

source§

impl TestVmSys

source

pub fn check_rootfs_file(rootfs_path: &Path)

source

fn configure_serial_devices( command: &mut Command, stdout_hardware_type: &str, from_guest_pipe: &Path, to_guest_pipe: &Path )

source

fn configure_rootfs( command: &mut Command, o_direct: bool, rw: bool, path: &Path )

Configures the VM rootfs to load from the guest_under_test assets.

source

pub fn new_generic<F>(f: F, cfg: Config, sudo: bool) -> Result<TestVmSys>
where F: FnOnce(&mut Command, &Path, &Config) -> Result<()>,

source

pub fn append_config_args( command: &mut Command, test_dir: &Path, cfg: &Config ) -> Result<()>

source

fn generate_json_config_file(test_dir: &Path, cfg: &Config) -> Result<PathBuf>

Generate a JSON configuration file for cfg and returns its path.

source

pub fn append_config_file_arg( command: &mut Command, test_dir: &Path, cfg: &Config ) -> Result<()>

source

pub fn crosvm_command( &self, command: &str, args: Vec<String>, sudo: bool ) -> Result<Vec<u8>>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.