summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-03-23 16:51:30 -0600
committerJens Axboe <axboe@kernel.dk>2022-03-23 16:51:30 -0600
commit8b0529c24be9ed50c4422b479f5b2c7cdc837777 (patch)
tree411091ec1c6afb7f6c6a3bf8e52ea8aa65d3f668
parenta264c2db27df2da90201d8e61f927ddf9320fa0e (diff)
downloadliburing-8b0529c24be9ed50c4422b479f5b2c7cdc837777.tar.gz
liburing-8b0529c24be9ed50c4422b479f5b2c7cdc837777.tar.bz2
test/recv-msgall-stream: remove nonblocking connect code
Not using nonblocking sockets here anymore, so just kill it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/recv-msgall-stream.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/test/recv-msgall-stream.c b/test/recv-msgall-stream.c
index 3127b5f..a4dfe6f 100644
--- a/test/recv-msgall-stream.c
+++ b/test/recv-msgall-stream.c
@@ -13,7 +13,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <pthread.h>
-#include <poll.h>
#include "liburing.h"
#include "helpers.h"
@@ -295,34 +294,8 @@ static int do_send(struct recv_data *rd)
ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
if (ret < 0) {
- struct pollfd pfd = {
- .fd = sockfd,
- .events = POLLOUT,
- };
-
- if (errno != EINPROGRESS) {
- perror("connect");
- return 1;
- }
-
- if (poll(&pfd, 1, -1) < 0) {
- perror("poll");
- return 1;
- }
- if (!(pfd.revents & POLLOUT)) {
- fprintf(stderr, "huh\n");
- return 1;
- }
-
- while (1) {
- int out;
- socklen_t len = sizeof(out);
-
- getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &out, &len);
- if (!out)
- break;
- usleep(1000);
- }
+ perror("connect");
+ return 1;
}
iov.iov_base = buf;