From ede286f9d433fbf3fa46794ae8d906697a5b303d Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Tue, 18 Feb 2014 16:07:38 +0200 Subject: libsystemd-dhcp: Add capability to print out test steps --- src/libsystemd-dhcp/test-dhcp-client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libsystemd-dhcp/test-dhcp-client.c b/src/libsystemd-dhcp/test-dhcp-client.c index f341b3c713..32c79ebb68 100644 --- a/src/libsystemd-dhcp/test-dhcp-client.c +++ b/src/libsystemd-dhcp/test-dhcp-client.c @@ -38,6 +38,7 @@ static struct ether_addr mac_addr = { .ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'} }; +static bool verbose = false; static int test_fd[2]; static void test_request_basic(sd_event *e) @@ -46,6 +47,9 @@ static void test_request_basic(sd_event *e) sd_dhcp_client *client; + if (verbose) + printf("* %s\n", __FUNCTION__); + r = sd_dhcp_client_new(&client); assert(r >= 0); @@ -126,6 +130,9 @@ static void test_checksum(void) 0xff, 0xff, 0xff, 0xff }; + if (verbose) + printf("* %s\n", __FUNCTION__); + assert(client_checksum(&buf, 20) == be16toh(0x78ae)); } @@ -207,6 +214,9 @@ static void test_discover_message(sd_event *e) sd_dhcp_client *client; int res, r; + if (verbose) + printf("* %s\n", __FUNCTION__); + r = sd_dhcp_client_new(&client); assert(r >= 0); assert(client); -- cgit v1.2.3-54-g00ecf