summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib/libc/net/test-eui64_line.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/lib/libc/net/test-eui64_line.c')
-rw-r--r--tools/regression/lib/libc/net/test-eui64_line.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/regression/lib/libc/net/test-eui64_line.c b/tools/regression/lib/libc/net/test-eui64_line.c
index 463042a..714b460 100644
--- a/tools/regression/lib/libc/net/test-eui64_line.c
+++ b/tools/regression/lib/libc/net/test-eui64_line.c
@@ -40,17 +40,20 @@ test_line(const char *line, const struct eui64 *eui, const char *host)
{
struct eui64 e;
char buf[256];
+ static int test = 0;
+
+ test++;
if (eui64_line(line, &e, buf, sizeof(buf)) != 0 ||
memcmp(&e, eui, sizeof(struct eui64)) != 0 ||
strcmp(buf, host) != 0) {
- printf("FAIL: eui64_line(\"%s\")\n", line);
- printf("host = %s\n", buf);
+ printf("not ok %d - eui64_line(\"%s\")\n", test, line);
+ printf("# host = %s\n", buf);
eui64_ntoa(&e, buf, sizeof(buf));
- printf("e = %s\n", buf);
+ printf("# e = %s\n", buf);
return (0);
} else {
- printf("PASS: eui64_line(\"%s\")\n", line);
+ printf("ok %d - eui64_line(\"%s\")\n", test, line);
return (1);
}
}
@@ -59,6 +62,8 @@ int
main(int argc, char **argv)
{
+ printf("1..6\n");
+
test_line(test_eui64_line_id, &test_eui64_id,
test_eui64_id_host);
test_line(test_eui64_line_id_colon, &test_eui64_id,
OpenPOWER on IntegriCloud