anchao opened a new pull request, #6974:
URL: https://github.com/apache/incubator-nuttx/pull/6974

   ## Summary
   
   net/usrsock: forward FIONBIO to socket level
   
   fix usrsock nonblock connect test break:
   
   ```
   apps/examples/usrsocktest/usrsocktest_noblock_connect.c:
   
   ...
   157 TEST(no_block_connect, delayed_connect)
   158 {
   ...
   190   ret = fcntl(sd, F_SETFL, flags | O_NONBLOCK);
   ...
   204   ret = connect(sd, (FAR const struct sockaddr *)&addr, sizeof(addr));
   205   TEST_ASSERT_EQUAL(-1, ret);
   206   TEST_ASSERT_EQUAL(EINPROGRESS, errno);
   ```
   
   should goahead to socket level:
   
   ```
   nuttx/net/netdev/netdev_ioctl.c:
   ...
   1755 int psock_vioctl(FAR struct socket *psock, int cmd, va_list ap)
   1756 {
   ...
   1771   ret = netdev_ioctl(psock, cmd, arg);
   ...
   1775   if (ret == -ENOTTY)
   1776     {
   1777       ret = netdev_file_ioctl(psock, cmd, arg);
   1778     }
   ...
   ```
   
   Signed-off-by: chao an <anc...@xiaomi.com>
   
   
   ## Impact
   
   ## Testing
   Pass the usrsock test:
   
https://github.com/apache/incubator-nuttx-apps/blob/master/examples/usrsocktest/usrsocktest_noblock_connect.c#L190-L204


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to