chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
load-fragment: remove wrong ifdef guard
[elogind.git]
/
src
/
test
/
test-socket-util.c
diff --git
a/src/test/test-socket-util.c
b/src/test/test-socket-util.c
index 17180db65289b9a0c3867e669b970a28adf70e29..6fb4a40944cfd28de9d92fdfb5b785efc2fd014a 100644
(file)
--- a/
src/test/test-socket-util.c
+++ b/
src/test/test-socket-util.c
@@
-236,7
+236,7
@@
static void *connect_thread(void *arg) {
_cleanup_close_ int fd = -1;
fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
_cleanup_close_ int fd = -1;
fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
- assert(fd >= 0);
+ assert
_se
(fd >= 0);
assert_se(connect(fd, &sa->sa, sizeof(sa->in)) == 0);
assert_se(connect(fd, &sa->sa, sizeof(sa->in)) == 0);
@@
-258,12
+258,12
@@
static void test_nameinfo_pretty(void) {
_cleanup_close_ int sfd = -1, cfd = -1;
r = getnameinfo_pretty(STDIN_FILENO, &stdin_name);
_cleanup_close_ int sfd = -1, cfd = -1;
r = getnameinfo_pretty(STDIN_FILENO, &stdin_name);
- log_info
("No connection remote: %s", strerror(-r)
);
+ log_info
_errno(r, "No connection remote: %m"
);
assert_se(r < 0);
sfd = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0);
assert_se(r < 0);
sfd = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0);
- assert(sfd >= 0);
+ assert
_se
(sfd >= 0);
assert_se(bind(sfd, &s.sa, sizeof(s.in)) == 0);
assert_se(bind(sfd, &s.sa, sizeof(s.in)) == 0);
@@
-276,11
+276,11
@@
static void test_nameinfo_pretty(void) {
log_debug("Accepting new connection on fd:%d", sfd);
cfd = accept4(sfd, &c.sa, &clen, SOCK_CLOEXEC);
log_debug("Accepting new connection on fd:%d", sfd);
cfd = accept4(sfd, &c.sa, &clen, SOCK_CLOEXEC);
- assert(cfd >= 0);
+ assert
_se
(cfd >= 0);
r = getnameinfo_pretty(cfd, &localhost);
log_info("Connection from %s", localhost);
r = getnameinfo_pretty(cfd, &localhost);
log_info("Connection from %s", localhost);
- assert(r == 0);
+ assert
_se
(r == 0);
}
static void test_sockaddr_equal(void) {
}
static void test_sockaddr_equal(void) {