From: David Ahern <dsahern@kernel.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, schoen@loyalty.org,
David Ahern <dsahern@gmail.com>
Subject: [PATCH net-next v2 07/11] selftests: Add missing newline in nettest error messages
Date: Sat, 9 Jan 2021 17:18:48 -0700 [thread overview]
Message-ID: <20210110001852.35653-8-dsahern@kernel.org> (raw)
In-Reply-To: <20210110001852.35653-1-dsahern@kernel.org>
From: David Ahern <dsahern@gmail.com>
A few logging lines are missing the newline, or need it moved up for
cleaner logging.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/testing/selftests/net/nettest.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c
index 13c74774e357..159430a0fc9b 100644
--- a/tools/testing/selftests/net/nettest.c
+++ b/tools/testing/selftests/net/nettest.c
@@ -199,7 +199,7 @@ static void log_address(const char *desc, struct sockaddr *sa)
if (sa->sa_family == AF_INET) {
struct sockaddr_in *s = (struct sockaddr_in *) sa;
- log_msg("%s %s:%d",
+ log_msg("%s %s:%d\n",
desc,
inet_ntop(AF_INET, &s->sin_addr, addrstr,
sizeof(addrstr)),
@@ -208,15 +208,13 @@ static void log_address(const char *desc, struct sockaddr *sa)
} else if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *s6 = (struct sockaddr_in6 *) sa;
- log_msg("%s [%s]:%d",
+ log_msg("%s [%s]:%d\n",
desc,
inet_ntop(AF_INET6, &s6->sin6_addr, addrstr,
sizeof(addrstr)),
ntohs(s6->sin6_port));
}
- printf("\n");
-
fflush(stdout);
}
@@ -594,7 +592,7 @@ static int expected_addr_match(struct sockaddr *sa, void *expected,
struct in_addr *exp_in = (struct in_addr *) expected;
if (s->sin_addr.s_addr != exp_in->s_addr) {
- log_error("%s address does not match expected %s",
+ log_error("%s address does not match expected %s\n",
desc,
inet_ntop(AF_INET, exp_in,
addrstr, sizeof(addrstr)));
@@ -605,14 +603,14 @@ static int expected_addr_match(struct sockaddr *sa, void *expected,
struct in6_addr *exp_in = (struct in6_addr *) expected;
if (memcmp(&s6->sin6_addr, exp_in, sizeof(*exp_in))) {
- log_error("%s address does not match expected %s",
+ log_error("%s address does not match expected %s\n",
desc,
inet_ntop(AF_INET6, exp_in,
addrstr, sizeof(addrstr)));
rc = 1;
}
} else {
- log_error("%s address does not match expected - unknown family",
+ log_error("%s address does not match expected - unknown family\n",
desc);
rc = 1;
}
@@ -731,7 +729,7 @@ static int convert_addr(struct sock_args *args, const char *_str,
}
break;
default:
- log_error("unknown address type");
+ log_error("unknown address type\n");
exit(1);
}
--
2.24.3 (Apple Git-128)
next prev parent reply other threads:[~2021-01-10 0:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-10 0:18 [PATCH net-next v2 00/11] selftests: Updates to allow single instance of nettest for client and server David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 01/11] selftests: Move device validation in nettest David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 02/11] selftests: Move convert_addr up " David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 03/11] selftests: Move address validation " David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 04/11] selftests: Add options to set network namespace to nettest David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 05/11] selftests: Add support to nettest to run both client and server David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 06/11] selftests: Use separate stdout and stderr buffers in nettest David Ahern
2021-01-12 0:15 ` Jakub Kicinski
2021-01-12 0:20 ` David Ahern
2021-01-10 0:18 ` David Ahern [this message]
2021-01-10 0:18 ` [PATCH net-next v2 08/11] selftests: Make address validation apply only to client mode David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 09/11] selftests: Consistently specify address for MD5 protection David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 10/11] selftests: Add new option for client-side passwords David Ahern
2021-01-10 0:18 ` [PATCH net-next v2 11/11] selftests: Add separate options for server device bindings David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210110001852.35653-8-dsahern@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=schoen@loyalty.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.