Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/sys/net catch up with link printing.
details: https://anonhg.NetBSD.org/src/rev/33bd4804530e
branches: trunk
changeset: 347477:33bd4804530e
user: christos <christos%NetBSD.org@localhost>
date: Sat Aug 27 11:30:49 2016 +0000
description:
catch up with link printing.
diffstat:
tests/sys/net/t_print.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 7dbe9dd0b307 -r 33bd4804530e tests/sys/net/t_print.c
--- a/tests/sys/net/t_print.c Sat Aug 27 10:07:05 2016 +0000
+++ b/tests/sys/net/t_print.c Sat Aug 27 11:30:49 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $ */
+/* $NetBSD: t_print.c,v 1.2 2016/08/27 11:30:49 christos Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $");
+__RCSID("$NetBSD: t_print.c,v 1.2 2016/08/27 11:30:49 christos Exp $");
#include "net/dl_print.c"
@@ -147,7 +147,10 @@
memcpy(&sdl.sdl_addr, &tst[i].ia, sizeof(sdl.sdl_addr));
sdl.sdl_index = (uint16_t)i;
r = sdl_print(buf, l, &sdl);
- e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
+ if (i == 3)
+ e = snprintf(res, l, "link#%zu", i);
+ else
+ e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
ATF_REQUIRE_STREQ(buf, res);
ATF_REQUIRE_EQ(r, e);
}
@@ -157,7 +160,10 @@
memcpy(&sdl.sdl_addr, &tst[i].ia, sizeof(sdl.sdl_addr));
sdl.sdl_index = (uint16_t)i;
r = sdl_print(buf, l, &sdl);
- e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
+ if (i == 3)
+ e = snprintf(res, l, "link#%zu", i);
+ else
+ e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
ATF_REQUIRE_STREQ(buf, res);
ATF_REQUIRE_EQ(r, e);
}
Home |
Main Index |
Thread Index |
Old Index