summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2014-02-18 16:07:38 +0200
committerTom Gundersen <teg@jklm.no>2014-02-18 15:23:19 +0100
commitede286f9d433fbf3fa46794ae8d906697a5b303d (patch)
tree79b282efa125d64d4f9546d8e46ac69c0bd241a8 /src
parent8b7d0494a3fe35209d4db0d1b9e065e7e5cc9875 (diff)
libsystemd-dhcp: Add capability to print out test steps
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-dhcp/test-dhcp-client.c10
1 files changed, 10 insertions, 0 deletions
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);