@@ -24,14 +24,11 @@ use hyperlight_host::{
2424 GuestBinary , HyperlightError , MultiUseSandbox , Result , UninitializedSandbox , new_error,
2525} ;
2626use hyperlight_testing:: simple_guest_as_string;
27- #[ cfg( target_os = "windows" ) ]
28- use serial_test:: serial; // using LoadLibrary requires serial tests
2927
3028pub mod common; // pub to disable dead_code warning
3129use crate :: common:: get_simpleguest_sandboxes;
3230
3331#[ test]
34- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
3532fn pass_byte_array ( ) {
3633 for mut sandbox in get_simpleguest_sandboxes ( None ) . into_iter ( ) {
3734 const LEN : usize = 10 ;
@@ -49,7 +46,6 @@ fn pass_byte_array() {
4946
5047#[ test]
5148#[ ignore = "Fails with mismatched float only when c .exe guest?!" ]
52- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
5349fn float_roundtrip ( ) {
5450 let doubles = [
5551 0.0 ,
@@ -107,7 +103,6 @@ fn float_roundtrip() {
107103}
108104
109105#[ test]
110- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
111106fn invalid_guest_function_name ( ) {
112107 for mut sandbox in get_simpleguest_sandboxes ( None ) . into_iter ( ) {
113108 let fn_name = "FunctionDoesntExist" ;
@@ -120,7 +115,6 @@ fn invalid_guest_function_name() {
120115}
121116
122117#[ test]
123- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
124118fn set_static ( ) {
125119 for mut sandbox in get_simpleguest_sandboxes ( None ) . into_iter ( ) {
126120 let fn_name = "SetStatic" ;
@@ -133,7 +127,6 @@ fn set_static() {
133127}
134128
135129#[ test]
136- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
137130fn multiple_parameters ( ) {
138131 let ( tx, rx) = channel ( ) ;
139132 let writer = move |msg : String | {
@@ -181,7 +174,6 @@ fn multiple_parameters() {
181174}
182175
183176#[ test]
184- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
185177fn incorrect_parameter_type ( ) {
186178 for mut sandbox in get_simpleguest_sandboxes ( None ) {
187179 let res = sandbox. call :: < i32 > (
@@ -199,7 +191,6 @@ fn incorrect_parameter_type() {
199191}
200192
201193#[ test]
202- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
203194fn incorrect_parameter_num ( ) {
204195 for mut sandbox in get_simpleguest_sandboxes ( None ) . into_iter ( ) {
205196 let res = sandbox. call :: < i32 > ( "Echo" , ( "1" . to_string ( ) , 2_i32 ) ) ;
@@ -229,7 +220,6 @@ fn max_memory_sandbox() {
229220}
230221
231222#[ test]
232- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
233223fn iostack_is_working ( ) {
234224 for mut sandbox in get_simpleguest_sandboxes ( None ) . into_iter ( ) {
235225 let res: i32 = sandbox
@@ -290,13 +280,11 @@ fn simple_test_helper() -> Result<()> {
290280}
291281
292282#[ test]
293- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
294283fn simple_test ( ) {
295284 simple_test_helper ( ) . unwrap ( ) ;
296285}
297286
298287#[ test]
299- #[ cfg( target_os = "linux" ) ]
300288fn simple_test_parallel ( ) {
301289 let handles: Vec < _ > = ( 0 ..50 )
302290 . map ( |_| {
@@ -333,13 +321,11 @@ fn callback_test_helper() -> Result<()> {
333321}
334322
335323#[ test]
336- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
337324fn callback_test ( ) {
338325 callback_test_helper ( ) . unwrap ( ) ;
339326}
340327
341328#[ test]
342- #[ cfg( target_os = "linux" ) ] // windows can't run parallel with LoadLibrary
343329fn callback_test_parallel ( ) {
344330 let handles: Vec < _ > = ( 0 ..100 )
345331 . map ( |_| {
@@ -355,7 +341,6 @@ fn callback_test_parallel() {
355341}
356342
357343#[ test]
358- #[ cfg_attr( target_os = "windows" , serial) ] // using LoadLibrary requires serial tests
359344fn host_function_error ( ) -> Result < ( ) > {
360345 for mut sandbox in get_uninit_simpleguest_sandboxes ( None ) . into_iter ( ) {
361346 // create host function
0 commit comments