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.
This commit is contained in:
Patrik Flykt
2015-09-23 14:00:03 +03:00
parent d7c9c21f18
commit 44598572da

View File

@@ -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);