mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 23:20:32 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user