File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/tools/miri/tests/pass-dep/libc Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -88,23 +88,19 @@ fn test_socketpair_threaded() {
8888 assert_eq ! ( res, 5 ) ;
8989 assert_eq ! ( buf, "abcde" . as_bytes( ) ) ;
9090 } ) ;
91- // FIXME: we should yield here once blocking is implemented.
92- //thread::yield_now();
91+ thread:: yield_now ( ) ;
9392 let data = "abcde" . as_bytes ( ) . as_ptr ( ) ;
9493 let res = unsafe { libc:: write ( fds[ 0 ] , data as * const libc:: c_void , 5 ) } ;
9594 assert_eq ! ( res, 5 ) ;
9695 thread1. join ( ) . unwrap ( ) ;
9796
9897 // Read and write from different direction
9998 let thread2 = thread:: spawn ( move || {
100- // FIXME: we should yield here once blocking is implemented.
101- //thread::yield_now();
99+ thread:: yield_now ( ) ;
102100 let data = "12345" . as_bytes ( ) . as_ptr ( ) ;
103101 let res = unsafe { libc:: write ( fds[ 1 ] , data as * const libc:: c_void , 5 ) } ;
104102 assert_eq ! ( res, 5 ) ;
105103 } ) ;
106- // FIXME: we should not yield here once blocking is implemented.
107- thread:: yield_now ( ) ;
108104 let mut buf: [ u8 ; 5 ] = [ 0 ; 5 ] ;
109105 let res = unsafe { libc:: read ( fds[ 0 ] , buf. as_mut_ptr ( ) . cast ( ) , buf. len ( ) as libc:: size_t ) } ;
110106 assert_eq ! ( res, 5 ) ;
You can’t perform that action at this time.
0 commit comments