[systemd-devel] [PATCH 13/24] sd-dhcp6-client: Add RA and DHCPv6 Solicit test case

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Wed Jun 18 07:00:40 PDT 2014


On Fri, Jun 13, 2014 at 04:45:03PM +0300, Patrik Flykt wrote:
> Copy Router Advertisement functions and data from the previous
> test case and verify the created Solicit message. The test will
> take some non-trivial time to run due to the DHCPv6 initial delay.
> ---
>  Makefile.am                                |   1 +
>  src/libsystemd-network/test-dhcp6-client.c | 181 +++++++++++++++++++++++++++++
>  2 files changed, 182 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index f6340dc..87ac728 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -2580,6 +2580,7 @@ test_dhcp6_rs_LDADD = \
>  
>  test_dhcp6_client_SOURCES = \
>  	src/systemd/sd-dhcp6-client.h \
> +	src/libsystemd-network/dhcp6-icmp6.h \
>  	src/libsystemd-network/dhcp6-internal.h \
>  	src/libsystemd-network/test-dhcp6-client.c
>  
> diff --git a/src/libsystemd-network/test-dhcp6-client.c b/src/libsystemd-network/test-dhcp6-client.c
> index b52f407..e8cc07d 100644
> --- a/src/libsystemd-network/test-dhcp6-client.c
> +++ b/src/libsystemd-network/test-dhcp6-client.c
> @@ -21,7 +21,12 @@
>  
>  #include <stdbool.h>
>  #include <stdio.h>
> +#include <sys/types.h>
> +#include <sys/socket.h>
> +#include <unistd.h>
> +#include <netinet/icmp6.h>
>  
> +#include "socket-util.h"
>  #include "macro.h"
>  #include "sd-event.h"
>  #include "event-util.h"
> @@ -36,6 +41,12 @@ static struct ether_addr mac_addr = {
>  
>  static bool verbose = false;
Why not always run in verbose mode (in this test and other too)?
Normally the test output is redirected to a file, and most tests
binaries spit out debug messages freely.

Zbyszek


More information about the systemd-devel mailing list