@@ -925,11 +925,7 @@ mod tests {
925
925
event_values. get ( "metadata" ) . unwrap ( ) . as_object ( ) . unwrap ( ) ;
926
926
let event_values_map = event_values. as_object ( ) . unwrap ( ) ;
927
927
928
- #[ cfg( target_os = "windows" ) ]
929
- let expected_error =
930
- "IOError(Os { code: 2, kind: NotFound, message: \" The system cannot find the file specified.\" }" ;
931
- #[ cfg( not( target_os = "windows" ) ) ]
932
- let expected_error = "IOError(Os { code: 2, kind: NotFound, message: \" No such file or directory\" }" ;
928
+ let expected_error_start = "Error(\" GuestBinary not found:" ;
933
929
934
930
let err_vals_res = try_to_strings ( [
935
931
( metadata_values_map, "level" ) ,
@@ -939,7 +935,7 @@ mod tests {
939
935
] ) ;
940
936
if let Ok ( err_vals) = err_vals_res {
941
937
if err_vals[ 0 ] == "ERROR"
942
- && err_vals[ 1 ] . starts_with ( expected_error )
938
+ && err_vals[ 1 ] . starts_with ( expected_error_start )
943
939
&& err_vals[ 2 ] == "hyperlight_host::sandbox::uninitialized"
944
940
&& err_vals[ 3 ] == "hyperlight_host::sandbox::uninitialized"
945
941
{
@@ -1016,8 +1012,11 @@ mod tests {
1016
1012
// Log record 17
1017
1013
1018
1014
let logcall = TEST_LOGGER . get_log_call ( 16 ) . unwrap ( ) ;
1015
+ println ! ( "{:?}" , logcall. args) ;
1019
1016
assert_eq ! ( Level :: Error , logcall. level) ;
1020
- assert ! ( logcall. args. starts_with( "error=IOError(Os { code" ) ) ;
1017
+ assert ! ( logcall
1018
+ . args
1019
+ . starts_with( "error=Error(\" GuestBinary not found:" ) ) ;
1021
1020
assert_eq ! ( "hyperlight_host::sandbox::uninitialized" , logcall. target) ;
1022
1021
1023
1022
// Log record 18
@@ -1069,7 +1068,9 @@ mod tests {
1069
1068
1070
1069
let logcall = TEST_LOGGER . get_log_call ( 1 ) . unwrap ( ) ;
1071
1070
assert_eq ! ( Level :: Error , logcall. level) ;
1072
- assert ! ( logcall. args. starts_with( "error=IOError" ) ) ;
1071
+ assert ! ( logcall
1072
+ . args
1073
+ . starts_with( "error=Error(\" GuestBinary not found:" ) ) ;
1073
1074
assert_eq ! ( "hyperlight_host::sandbox::uninitialized" , logcall. target) ;
1074
1075
}
1075
1076
{
0 commit comments