summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-dhcp6-client.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2015-09-23 14:00:03 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2015-09-23 15:11:09 +0300
commit44598572da523f66872f593be7139b9a0f97deee (patch)
treea401e949aec013b6abebfcde9662005b55fe558d /src/libsystemd-network/test-dhcp6-client.c
parentd7c9c21f18704580f66a1ce73fb6b506fdf40732 (diff)
test-dhcp6-client: Update test case due to changed semantics
Update the test case to stop the ongoing Information Request exchange before unsetting its state. To keep the test case callback verification simpler, temporarily unset the callback function before stopping.
Diffstat (limited to 'src/libsystemd-network/test-dhcp6-client.c')
-rw-r--r--src/libsystemd-network/test-dhcp6-client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-network/test-dhcp6-client.c b/src/libsystemd-network/test-dhcp6-client.c
index 178f536337..0c131a9897 100644
--- a/src/libsystemd-network/test-dhcp6-client.c
+++ b/src/libsystemd-network/test-dhcp6-client.c
@@ -581,7 +581,11 @@ static void test_client_information_cb(sd_dhcp6_client *client, int event,
if (verbose)
printf(" got DHCPv6 event %d\n", event);
+ assert_se(sd_dhcp6_client_set_information_request(client, false) == -EBUSY);
+ assert_se(sd_dhcp6_client_set_callback(client, NULL, e) >= 0);
+ assert_se(sd_dhcp6_client_stop(client) >= 0);
assert_se(sd_dhcp6_client_set_information_request(client, false) >= 0);
+
assert_se(sd_dhcp6_client_set_callback(client,
test_client_solicit_cb, e) >= 0);