[systemd-devel] test-dhcp-client failing in mock builds

Patrik Flykt Patrik.Flykt at linux.intel.com
Mon Feb 2 03:36:29 PST 2015


	Hi,

On Sat, 2015-01-31 at 15:48 +0100, Zbigniew Jędrzejewski-Szmek wrote:
> DHCP CLIENT (0xa71f5099): STARTED on ifindex 42
> DHCP CLIENT (0xa71f5099): DISCOVER
> DHCP CLIENT (0xa71f5099): OFFER
> DHCP CLIENT (0xa71f5099): REQUEST (requesting)
> DHCP CLIENT (0xa71f5099): ACK
> DHCP CLIENT (0xa71f5099): lease expires in 9min 58.349975s
> DHCP CLIENT (0xa71f5099): T2 expires in 8min 43.759020s
> DHCP CLIENT (0xa71f5099): T1 expires in 4min 59.245773s

Up until here everything is fine, and the proper messages are sent back
and forth between the client code and the test program which pretends to
be the "server" in this scenario.

> DHCP CLIENT (0xa71f5099): STOPPED: Operation not permitted

This printout comes from client_stop(sd_dhcp_client *client, int error)
when given a negative error value.

"Operation not permitted" is what is printed for EPERM. But EPERM is not
present in the client code itself, so I'm inclined towards a "permission
problem" somewhere when running mock.

In function client_handle_message(), the function call to
client_set_lease_timeouts() is the one printing the T2 and T1 expiration
values. After this function, the first possible call to client_stop()
containing a negative value which that does not log additional strings
beforehand happens in client_initialize_io_events(). This if the io
handler cannot be (re?)set for some reason. It seems there already
exists an io handler at this point, but why it should fail only for mock
is something I don't understand. The test program just worksforme too.

It can't really be the following client_notify(client, notify_event)
call either, as notify_event >= 0 or r, where r must have been >= 0 to
begin with. If it was client_handle_ack() that returned < 0 a little bit
earlier, no T2 and T1 timers would have been set.

With the above I was assuming that the latest version was used and not
an older release.


Cheers,

	Patrik



More information about the systemd-devel mailing list