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
impl TestVmSys
pub fn check_rootfs_file(rootfs_path: &Path)
fn configure_serial_devices( command: &mut Command, stdout_hardware_type: &str, from_guest_pipe: &Path, to_guest_pipe: &Path )
sourcefn configure_rootfs(
command: &mut Command,
o_direct: bool,
rw: bool,
path: &Path
)
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.
pub fn new_generic<F>(f: F, cfg: Config, sudo: bool) -> Result<TestVmSys>
pub fn append_config_args( command: &mut Command, test_dir: &Path, cfg: &Config ) -> Result<()>
sourcefn generate_json_config_file(test_dir: &Path, cfg: &Config) -> Result<PathBuf>
fn generate_json_config_file(test_dir: &Path, cfg: &Config) -> Result<PathBuf>
Generate a JSON configuration file for cfg
and returns its path.
pub fn append_config_file_arg( command: &mut Command, test_dir: &Path, cfg: &Config ) -> Result<()>
pub fn crosvm_command( &self, command: &str, args: Vec<String>, sudo: bool ) -> Result<Vec<u8>>
Auto Trait Implementations§
impl RefUnwindSafe for TestVmSys
impl Send for TestVmSys
impl Sync for TestVmSys
impl Unpin for TestVmSys
impl UnwindSafe for TestVmSys
Blanket Implementations§
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
Mutably borrows from an owned value. Read more