[systemd-devel] libsystemd-network tests failing in mock

Tom Gundersen teg at jklm.no
Thu Dec 11 05:46:00 PST 2014


On Thu, Dec 11, 2014 at 9:14 AM, Jan Synáček <jsynacek at redhat.com> wrote:
> test-dhcp-{client,server} are failing in mock:
>
> FAIL: test-dhcp-client
> ======================
> Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:138, function sd_dhcp_client_set_request_option(). Ignoring.
> Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:169, function sd_dhcp_client_set_request_address(). Ignoring.
> Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:182, function sd_dhcp_client_set_index(). Ignoring.
> Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:185, function sd_dhcp_client_set_index(). Ignoring.
> Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:185, function sd_dhcp_client_set_index(). Ignoring.
> Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:185, function sd_dhcp_client_set_index(). Ignoring.
> DHCP CLIENT (0x0): FREE
> DHCP CLIENT (0xbe31128b): STARTED on ifindex 42
> DHCP CLIENT (0xbe31128b): DISCOVER
> DHCP CLIENT (0xbe31128b): STOPPED
> DHCP CLIENT (0x0): FREE
> DHCP CLIENT (0x45d3fd67): STARTED on ifindex 42
> DHCP CLIENT (0x45d3fd67): DISCOVER
> DHCP CLIENT (0x45d3fd67): OFFER
> DHCP CLIENT (0x45d3fd67): REQUEST (requesting)
> DHCP CLIENT (0x45d3fd67): ACK
> DHCP CLIENT (0x45d3fd67): lease expires in 9min 57.698157s
> DHCP CLIENT (0x45d3fd67): T2 expires in 8min 42.895614s
> DHCP CLIENT (0x45d3fd67): T1 expires in 5min 101.292ms
> DHCP CLIENT (0x45d3fd67): STOPPED: Operation not permitted


This is really odd. I cannot reproduce, and looking at the code I
cannot figure out how this could ever happen. I pushed a bit of extra
logging just now, but even so I really don't see it.

Any chance you can reproduce this locally and either let me know how,
or go step through it with gdb and see where the EPERM originates?

> Assertion 'event == DHCP_EVENT_IP_ACQUIRE' failed at ../src/libsystemd-network/test-dhcp-client.c:367, function test_addr_acq_acquired(). Aborting.

> SKIP: test-dhcp-server
> ======================
> Assertion '!server->event' failed at ../src/libsystemd-network/sd-dhcp-server.c:179, function sd_dhcp_server_attach_event(). Ignoring.
> Assertion '!server->event' failed at ../src/libsystemd-network/sd-dhcp-server.c:179, function sd_dhcp_server_attach_event(). Ignoring.
> Assertion 'server->address != htobe32(INADDR_ANY)' failed at ../src/libsystemd-network/sd-dhcp-server.c:932, function sd_dhcp_server_start(). Ignoring.
> Assertion 'address->s_addr' failed at ../src/libsystemd-network/sd-dhcp-server.c:59, function sd_dhcp_server_set_address(). Ignoring.
> Assertion 'prefixlen <= 32' failed at ../src/libsystemd-network/sd-dhcp-server.c:60, function sd_dhcp_server_set_address(). Ignoring.
> Assertion 'server->address == htobe32(INADDR_ANY)' failed at ../src/libsystemd-network/sd-dhcp-server.c:61, function sd_dhcp_server_set_address(). Ignoring.
> Assertion 'address->s_addr' failed at ../src/libsystemd-network/sd-dhcp-server.c:39, function sd_dhcp_server_set_lease_pool(). Ignoring.
> Assertion 'size' failed at ../src/libsystemd-network/sd-dhcp-server.c:40, function sd_dhcp_server_set_lease_pool(). Ignoring.
> Assertion 'server->pool_start == htobe32(INADDR_ANY)' failed at ../src/libsystemd-network/sd-dhcp-server.c:41, function sd_dhcp_server_set_lease_pool(). Ignoring.
> DHCP SERVER: STOPPED
> DHCP SERVER: UNREF
> DHCP SERVER: STOPPED
>
> Any ideas about how to fix those?

This is expected if run as non-root (we need some caps to run the dhcp
server), it is just a SKIP and not a FAIL, so that is fine.

Cheers,

Tom


More information about the systemd-devel mailing list