@@ -57,7 +57,7 @@ fn test_socketpair_setfl_getfl() {
57
57
let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_GETFL ) } ;
58
58
assert_eq ! ( res, new_flag) ;
59
59
60
- // Test unset flag
60
+ // Test if O_NONBLOCK flag can be unset.
61
61
let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_SETFL , 0 ) } ;
62
62
assert_eq ! ( res, 0 ) ;
63
63
let new_flag = libc:: O_RDWR ;
@@ -75,7 +75,7 @@ fn test_pipe_setfl_getfl() {
75
75
let res = unsafe { libc:: pipe ( fds. as_mut_ptr ( ) ) } ;
76
76
assert_eq ! ( res, 0 ) ;
77
77
78
- // Test if both sides have O_RDWR .
78
+ // Both sides should either have O_RONLY or O_WRONLY .
79
79
let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_GETFL ) } ;
80
80
assert_eq ! ( res, libc:: O_RDONLY ) ;
81
81
let res = unsafe { libc:: fcntl ( fds[ 1 ] , libc:: F_GETFL ) } ;
@@ -90,7 +90,7 @@ fn test_pipe_setfl_getfl() {
90
90
let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_GETFL ) } ;
91
91
assert_eq ! ( res, new_flag) ;
92
92
93
- // Test unset flag.
93
+ // Test if O_NONBLOCK flag can be unset .
94
94
let res = unsafe { libc:: fcntl ( fds[ 0 ] , libc:: F_SETFL , 0 ) } ;
95
95
assert_eq ! ( res, 0 ) ;
96
96
let new_flag = libc:: O_RDONLY ;
0 commit comments