lsb

/tset/LSB.os/network/accept/T.accept /tset/LSB.os/network/connect/T.connect tests failed due to fcntl

Bug #1327888 reported by Jeff Johnson
6
This bug affects 1 person
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.os/network/accept/T.accept
Checks accept for errno value EAGAIN or EWOULDBLOCK
fcntl syscall returned error

/tset/LSB.os/network/connect/T.connect
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://pubs.opengroup.org/onlinepubs/9699919799/).

/tset/LSB.os/network/connect/connect.c
- 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.

Tags: tests update
Changed in mandriva:
importance: Unknown → High
status: Unknown → In Progress
Jeff Johnson (n3npq)
tags: added: update
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.