[riot-notifications] [RIOT-OS/RIOT] tests/gnrc_dhcpv6_client: Fix for newer Kea versions and remove sudo requirement (#16792)

Martine Lenders notifications at github.com
Wed Sep 1 15:59:32 CEST 2021


> we may as well leave the shell if its no longer used

That does not work. The `sleep 1` needs to be called while the test is already running. Otherwise, on systems such as Arch, the TAP interface will not be connected yet, letting the test fail:

```
2021-09-01 15:56:26.164 INFO  [kea-dhcp6.dhcp6/229179.140037386780352] DHCP6_STARTING Kea DHCPv6 server version 1.9.10 (development) starting
2021-09-01 15:56:26.164 WARN  [kea-dhcp6.dhcp6/229179.140037386780352] DHCP6_DEVELOPMENT_VERSION This software is a development branch of Kea. It is not recommended for production use.
2021-09-01 15:56:26.165 INFO  [kea-dhcp6.hosts/229179.140037386780352] HOSTS_BACKENDS_REGISTERED the following host backend types are available: mysql postgresql 
2021-09-01 15:56:26.165 INFO  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_CFGMGR_ADD_IFACE listening on interface tapbr0
2021-09-01 15:56:26.166 INFO  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_CFGMGR_NEW_SUBNET6 a new subnet has been added to configuration: 2001:db8::/32 with params: t1=1000, t2=2000, preferred-lifetime=3000, valid-lifetime=4000, rapid-commit is false
2021-09-01 15:56:26.166 INFO  [kea-dhcp6.dhcp6/229179.140037386780352] DHCP6_CONFIG_COMPLETE DHCPv6 server has completed configuration: added IPv6 subnets: 1; DDNS: disabled
2021-09-01 15:56:26.166 INFO  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_MEMFILE_DB opening memory file lease database: name=kea-dhcp6.leases.csv type=memfile universe=6
2021-09-01 15:56:26.166 INFO  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file kea-dhcp6.leases.csv
2021-09-01 15:56:26.166 INFO  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_MEMFILE_LFC_SETUP setting up the Lease File Cleanup interval to 3600 sec
2021-09-01 15:56:26.167 INFO  [kea-dhcp6.dhcp6/229179.140037386780352] DHCP6_USING_SERVERID server is using server-id 00:01:00:01:28:c2:34:1b:d4:6d:6d:fd:93:9b and stores in the file ./kea-dhcp6-serverid
2021-09-01 15:56:26.167 WARN  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: the interface tapbr0 is not running
2021-09-01 15:56:26.167 WARN  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
2021-09-01 15:56:26.167 WARN  [kea-dhcp6.dhcp6/229179.140037386780352] DHCP6_MULTI_THREADING_INFO enabled: no, number of threads: 0, queue size: 0
2021-09-01 15:56:26.167 INFO  [kea-dhcp6.dhcp6/229179.140037386780352] DHCP6_STARTED Kea DHCPv6 server version 1.9.10 started
r
/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_dhcpv6_client/bin/native/tests_gnrc_dhcpv6_client.elf tap0 
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

NETOPT_RX_END_IRQ not implemented by driver
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2021.10-devel-364-g507d3-HEAD)
Iface  5  HWaddr: E2:BC:7D:CB:F5:50 
          L2-PDU:1500  MTU:1500  HL:64  Source address length: 6
          Link type: wired
          inet6 addr: fe80::e0bc:7dff:fecb:f550  scope: link  VAL
          inet6 group: ff02::1
          inet6 group: ff02::1:ffcb:f550
          
Iface  5  HWaddr: E2:BC:7D:CB:F5:50 
          L2-PDU:1500  MTU:1500  HL:64  Source address length: 6
          Link type: wired
          inet6 addr: fe80::e0bc:7dff:fecb:f550  scope: link  VAL
          inet6 group: ff02::1
          inet6 group: ff02::1:ffcb:f550
          
Timeout in expect script at "child.expect(r"inet6 addr:\s+(?P<global_addr>[0-9a-f:]+)\s+scope: global")" (tests/gnrc_dhcpv6_client/tests-with-config/01-run.py:59)
```

Note the lines

```
2021-09-01 15:56:26.167 WARN  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: the interface tapbr0 is not running
2021-09-01 15:56:26.167 WARN  [kea-dhcp6.dhcpsrv/229179.140037386780352] DHCPSRV_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
```

Without you suggestions it works fine.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16792#issuecomment-910312912
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210901/201db13f/attachment-0001.htm>


More information about the notifications mailing list