|
Zbigniew Jędrzejewski-Szmek |
db38be |
From fc292b5f5854f83379301affe97d909c7c18d702 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
From: Tom Gundersen <teg@jklm.no>
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
Date: Mon, 13 Oct 2014 10:07:05 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
Subject: [PATCH] test-dhcp-client: add more asserts
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
---
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
src/libsystemd-network/test-dhcp-client.c | 6 +++---
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
diff --git a/src/libsystemd-network/test-dhcp-client.c b/src/libsystemd-network/test-dhcp-client.c
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
index 7dab97de2f..0515440e4e 100644
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
--- a/src/libsystemd-network/test-dhcp-client.c
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
+++ b/src/libsystemd-network/test-dhcp-client.c
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
@@ -485,12 +485,12 @@ static void test_addr_acq(sd_event *e) {
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
res = sd_dhcp_client_start(client);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
assert_se(res == 0 || res == -EINPROGRESS);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
- sd_event_loop(e);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
+ assert_se(sd_event_loop(e) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
test_hangcheck = sd_event_source_unref(test_hangcheck);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
- sd_dhcp_client_set_callback(client, NULL, NULL);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
- sd_dhcp_client_stop(client);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
+ assert_se(sd_dhcp_client_set_callback(client, NULL, NULL) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
+ assert_se(sd_dhcp_client_stop(client) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
sd_dhcp_client_unref(client);
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
|
|
Zbigniew Jędrzejewski-Szmek |
db38be |
test_fd[1] = safe_close(test_fd[1]);
|