chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: fix creation of synthetic error replies
[elogind.git]
/
src
/
libsystemd
/
sd-rtnl
/
test-rtnl.c
diff --git
a/src/libsystemd/sd-rtnl/test-rtnl.c
b/src/libsystemd/sd-rtnl/test-rtnl.c
index 72d8fe2273c2d85bb7f9849de16975dfe2a01118..ed60b3cb4549ce30ee711200f000e0736417d785 100644
(file)
--- a/
src/libsystemd/sd-rtnl/test-rtnl.c
+++ b/
src/libsystemd/sd-rtnl/test-rtnl.c
@@
-353,6
+353,13
@@
static void test_get_addresses(sd_rtnl *rtnl) {
}
}
}
}
+static void test_message(void) {
+ _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+
+ assert_se(rtnl_message_new_synthetic_error(-ETIMEDOUT, 1, &m) >= 0);
+ assert_se(sd_rtnl_message_get_errno(m) == -ETIMEDOUT);
+}
+
int main(void) {
sd_rtnl *rtnl;
sd_rtnl_message *m;
int main(void) {
sd_rtnl *rtnl;
sd_rtnl_message *m;
@@
-361,6
+368,8
@@
int main(void) {
int if_loopback;
uint16_t type;
int if_loopback;
uint16_t type;
+ test_message();
+
test_match();
test_multiple();
test_match();
test_multiple();