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

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Jan 31 06:48:40 PST 2015


Hi,

I was trying to enable tests in the %check part of systemd rpm.
Something strange happens which causes test-dhcp-client when building
in mock:

FAIL: test-dhcp-client
======================

Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:141, function sd_dhcp_client_set_request_option(). Ignoring.
Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:172, function sd_dhcp_client_set_request_address(). Ignoring.
Assertion 'client' 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:188, function sd_dhcp_client_set_index(). Ignoring.
Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:188, function sd_dhcp_client_set_index(). Ignoring.
Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:188, function sd_dhcp_client_set_index(). Ignoring.
DHCP CLIENT (0x0): FREE
DHCP CLIENT (0x99188836): STARTED on ifindex 42
DHCP CLIENT (0x99188836): DISCOVER
DHCP CLIENT (0x99188836): STOPPED
DHCP CLIENT (0x0): FREE
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
DHCP CLIENT (0xa71f5099): STOPPED: Operation not permitted
Assertion 'event == DHCP_EVENT_IP_ACQUIRE' failed at ../src/libsystemd-network/test-dhcp-client.c:374, function test_addr_acq_acquired(). Aborting.
* test_request_basic
* test_checksum
* test_discover_message
  recv DHCP Discover 0x99188836
* test_addr_acq
  recv DHCP Discover 0xa71f5099
  sent DHCP Offer
  recv DHCP Request  0xa71f5099
  send DHCP Ack

As you can see, stopping fails with EPERM. But when I run it by hand
in the same build root, it works fine. Could this be some kind of race?
I don't know this part of the code at all, so I'm at loss here.

For comparison, the same binary executed by hand:

# ./test-dhcp-client 
* test_request_basic
Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:141, function sd_dhcp_client_set_request_option(). Ignoring.
Assertion 'client' failed at ../src/libsystemd-network/sd-dhcp-client.c:172, function sd_dhcp_client_set_request_address(). Ignoring.
Assertion 'client' 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:188, function sd_dhcp_client_set_index(). Ignoring.
Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:188, function sd_dhcp_client_set_index(). Ignoring.
Assertion 'interface_index > 0' failed at ../src/libsystemd-network/sd-dhcp-client.c:188, function sd_dhcp_client_set_index(). Ignoring.
DHCP CLIENT (0x0): FREE
* test_checksum
* test_discover_message
DHCP CLIENT (0x49229752): STARTED on ifindex 42
  recv DHCP Discover 0x49229752
DHCP CLIENT (0x49229752): DISCOVER
DHCP CLIENT (0x49229752): STOPPED
DHCP CLIENT (0x0): FREE
* test_addr_acq
DHCP CLIENT (0x244b510a): STARTED on ifindex 42
  recv DHCP Discover 0x244b510a
  sent DHCP Offer
DHCP CLIENT (0x244b510a): DISCOVER
DHCP CLIENT (0x244b510a): OFFER
  recv DHCP Request  0x244b510a
  send DHCP Ack
DHCP CLIENT (0x244b510a): REQUEST (requesting)
DHCP CLIENT (0x244b510a): ACK
DHCP CLIENT (0x244b510a): lease expires in 9min 57.257940s
DHCP CLIENT (0x244b510a): T2 expires in 8min 42.525380s
DHCP CLIENT (0x244b510a): T1 expires in 5min 231.299ms
  DHCP address acquired
DHCP CLIENT (0x244b510a): STOPPED
DHCP CLIENT (0x0): FREE

Zbyszek


More information about the systemd-devel mailing list