projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream' into stable
[gnulib.git]
/
tests
/
test-poll.c
diff --git
a/tests/test-poll.c
b/tests/test-poll.c
index
d78698e
..
7488090
100644
(file)
--- a/
tests/test-poll.c
+++ b/
tests/test-poll.c
@@
-1,5
+1,5
@@
/* Test of poll() function.
/* Test of poll() function.
- Copyright (C) 2008-20
09
Free Software Foundation, Inc.
+ Copyright (C) 2008-20
10
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-19,12
+19,16
@@
#include <config.h>
#include <config.h>
+#include <poll.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int));
+
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <poll.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
@@
-50,7
+54,7
@@
#define SO_REUSEPORT SO_REUSEADDR
#endif
#define SO_REUSEPORT SO_REUSEADDR
#endif
-#define TEST_PORT 12345
+#define TEST_PORT
12345
/* Minimal testing infrastructure. */
/* Minimal testing infrastructure. */
@@
-268,7
+272,7
@@
test_accept_first (void)
close (s);
c = connect_to_socket (true);
if (poll1_nowait (c, POLLOUT | POLLWRNORM | POLLRDBAND)
close (s);
c = connect_to_socket (true);
if (poll1_nowait (c, POLLOUT | POLLWRNORM | POLLRDBAND)
- != (POLLOUT | POLLWRNORM))
+
!= (POLLOUT | POLLWRNORM))
failed ("cannot write after blocking connect");
write (c, "foo", 3);
wait (&pid);
failed ("cannot write after blocking connect");
write (c, "foo", 3);
wait (&pid);