diff --git a/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs b/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs index ece7cc235..4cec0f459 100644 --- a/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs +++ b/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs @@ -361,7 +361,7 @@ fn create_surrogate_process( if let Err(e) = unsafe { CreateProcessA( PCSTR::null(), - p_cmd_line.into(), + Some(p_cmd_line.into()), Some(&process_attributes), Some(&thread_attributes), false, @@ -442,7 +442,9 @@ mod tests { let process_handle: HANDLE = surrogate_process.process_handle.into(); let job_handle: HANDLE = job_handle.into(); unsafe { - assert!(IsProcessInJob(process_handle, job_handle, &mut result).is_ok()); + assert!( + IsProcessInJob(process_handle, Some(job_handle), &mut result).is_ok() + ); assert!(result.as_bool()); } diff --git a/src/hyperlight_host/src/sandbox/uninitialized.rs b/src/hyperlight_host/src/sandbox/uninitialized.rs index 7413ee965..bf462a701 100644 --- a/src/hyperlight_host/src/sandbox/uninitialized.rs +++ b/src/hyperlight_host/src/sandbox/uninitialized.rs @@ -1114,6 +1114,12 @@ mod tests { None, None, ); + println!("{:?}", sbox); + #[cfg(target_os = "windows")] + assert!( + matches!(sbox, Err(e) if e.to_string().contains("GuestBinary not found: 'some/path/that/does/not/exist': The system cannot find the path specified. (os error 3)")) + ); + #[cfg(target_os = "linux")] assert!( matches!(sbox, Err(e) if e.to_string().contains("GuestBinary not found: 'some/path/that/does/not/exist': No such file or directory (os error 2)")) );