@@ -53,7 +53,7 @@ fn test_socketpair_setfl_getfl() {
5353 let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_GETFL ) } ;
5454 assert_eq ! ( res, new_flag) ;
5555
56- // Test unset flag
56+ // Test if O_NONBLOCK flag can be unset.
5757 let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_SETFL , 0 ) } ;
5858 assert_eq ! ( res, 0 ) ;
5959 let new_flag = libc:: O_RDWR ;
@@ -71,7 +71,7 @@ fn test_pipe_setfl_getfl() {
7171 let res = unsafe { libc:: pipe ( fds. as_mut_ptr ( ) ) } ;
7272 assert_eq ! ( res, 0 ) ;
7373
74- // Test if both sides have O_RDWR .
74+ // Both sides should either have O_RONLY or O_WRONLY .
7575 let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_GETFL ) } ;
7676 assert_eq ! ( res, libc:: O_RDONLY ) ;
7777 let res = unsafe { libc:: fcntl ( fds[ 1 ] , libc:: F_GETFL ) } ;
@@ -86,7 +86,7 @@ fn test_pipe_setfl_getfl() {
8686 let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_GETFL ) } ;
8787 assert_eq ! ( res, new_flag) ;
8888
89- // Test unset flag.
89+ // Test if O_NONBLOCK flag can be unset .
9090 let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_SETFL , 0 ) } ;
9191 assert_eq ! ( res, 0 ) ;
9292 let new_flag = libc:: O_RDONLY ;
0 commit comments