Skip to content

Commit

Permalink
Changes required by windows crate version 0.59
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Davies <[email protected]>
  • Loading branch information
simongdavies committed Jan 27, 2025
1 parent 1fb9ecb commit 305a527
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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());
}

Expand Down
6 changes: 6 additions & 0 deletions src/hyperlight_host/src/sandbox/uninitialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)"))
);
Expand Down

0 comments on commit 305a527

Please sign in to comment.