/tset/LSB.os/network/accept/T.accept /tset/LSB.os/network/connect/T.connect tests failed due to fcntl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
High
|
Bug Description
Hi,
Following tests are failing with the same error: "fcntl syscall returned
error".
/tset/LSB.
Checks accept for errno value EAGAIN or EWOULDBLOCK
fcntl syscall returned error
/tset/LSB.
Checks connect for errno value EINPROGRESS
fcntl syscall returned error
During investigation on the source code of the tests showed that the call to
fcntl is not according to POSIX specification.
The call to fcntl on F_GETFL should check the flags as return value, not as an
argument(http://
/tset/LSB.
- if((fcntl(sockfd, F_GETFL, flags)) == -1)
+ if((flags = fcntl(sockfd, F_GETFL, 0)) == -1)
"
NAME
fcntl - file control
...
RETURN VALUE
Upon successful completion, the value returned shall depend on cmd as
follows:
...
F_GETFL
Value of file status flags and access modes. The return value is not
negative.
..
"
I have attached a proposed patch for those failing tests. Please have a look.
Changed in mandriva: | |
importance: | Unknown → High |
status: | Unknown → In Progress |
tags: | added: update |