Skip to content

Commit 7ed76e8

Browse files
simongdaviessyntactically
authored andcommitted
Update windows crate dependencies
Signed-off-by: Simon Davies <[email protected]>
1 parent c623c90 commit 7ed76e8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ fn create_surrogate_process(
361361
if let Err(e) = unsafe {
362362
CreateProcessA(
363363
PCSTR::null(),
364-
p_cmd_line.into(),
364+
Some(p_cmd_line.into()),
365365
Some(&process_attributes),
366366
Some(&thread_attributes),
367367
false,
@@ -442,7 +442,9 @@ mod tests {
442442
let process_handle: HANDLE = surrogate_process.process_handle.into();
443443
let job_handle: HANDLE = job_handle.into();
444444
unsafe {
445-
assert!(IsProcessInJob(process_handle, job_handle, &mut result).is_ok());
445+
assert!(
446+
IsProcessInJob(process_handle, Some(job_handle), &mut result).is_ok()
447+
);
446448
assert!(result.as_bool());
447449
}
448450

src/hyperlight_host/src/sandbox/uninitialized.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,12 @@ mod tests {
11141114
None,
11151115
None,
11161116
);
1117+
println!("{:?}", sbox);
1118+
#[cfg(target_os = "windows")]
1119+
assert!(
1120+
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)"))
1121+
);
1122+
#[cfg(target_os = "linux")]
11171123
assert!(
11181124
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)"))
11191125
);

0 commit comments

Comments
 (0)