File tree 1 file changed +2
-6
lines changed
src/tools/miri/tests/pass-dep/libc
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() {
88
88
assert_eq ! ( res, 5 ) ;
89
89
assert_eq ! ( buf, "abcde" . as_bytes( ) ) ;
90
90
} ) ;
91
- // FIXME: we should yield here once blocking is implemented.
92
- //thread::yield_now();
91
+ thread:: yield_now ( ) ;
93
92
let data = "abcde" . as_bytes ( ) . as_ptr ( ) ;
94
93
let res = unsafe { libc:: write ( fds[ 0 ] , data as * const libc:: c_void , 5 ) } ;
95
94
assert_eq ! ( res, 5 ) ;
96
95
thread1. join ( ) . unwrap ( ) ;
97
96
98
97
// Read and write from different direction
99
98
let thread2 = thread:: spawn ( move || {
100
- // FIXME: we should yield here once blocking is implemented.
101
- //thread::yield_now();
99
+ thread:: yield_now ( ) ;
102
100
let data = "12345" . as_bytes ( ) . as_ptr ( ) ;
103
101
let res = unsafe { libc:: write ( fds[ 1 ] , data as * const libc:: c_void , 5 ) } ;
104
102
assert_eq ! ( res, 5 ) ;
105
103
} ) ;
106
- // FIXME: we should not yield here once blocking is implemented.
107
- thread:: yield_now ( ) ;
108
104
let mut buf: [ u8 ; 5 ] = [ 0 ; 5 ] ;
109
105
let res = unsafe { libc:: read ( fds[ 0 ] , buf. as_mut_ptr ( ) . cast ( ) , buf. len ( ) as libc:: size_t ) } ;
110
106
assert_eq ! ( res, 5 ) ;
You can’t perform that action at this time.
0 commit comments