* [PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity
@ 2025-06-15 8:48 Alok Tiwari
2025-06-16 15:45 ` Simon Horman
2025-06-17 23:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-06-15 8:48 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, horms, shuah, linux-kselftest,
netdev
Cc: alok.a.tiwari, linux-kernel, darren.kenny
This patch corrects several logging and error message in nettest.c:
- Corrects function name in log messages "setsockopt" -> "getsockopt".
- Closes missing parentheses in "setsockopt(IPV6_FREEBIND)".
- Replaces misleading error text ("Invalid port") with the correct
description ("Invalid prefix length").
- remove Redundant wording like "status from status" and clarifies
context in IPC error messages.
These changes improve readability and aid in debugging test output.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
v1 ->v2
remove extra space
---
tools/testing/selftests/net/nettest.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c
index cd8a58097448..1f5227f3d64d 100644
--- a/tools/testing/selftests/net/nettest.c
+++ b/tools/testing/selftests/net/nettest.c
@@ -385,7 +385,7 @@ static int get_bind_to_device(int sd, char *name, size_t len)
name[0] = '\0';
rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen);
if (rc < 0)
- log_err_errno("setsockopt(SO_BINDTODEVICE)");
+ log_err_errno("getsockopt(SO_BINDTODEVICE)");
return rc;
}
@@ -535,7 +535,7 @@ static int set_freebind(int sd, int version)
break;
case AF_INET6:
if (setsockopt(sd, SOL_IPV6, IPV6_FREEBIND, &one, sizeof(one))) {
- log_err_errno("setsockopt(IPV6_FREEBIND");
+ log_err_errno("setsockopt(IPV6_FREEBIND)");
rc = -1;
}
break;
@@ -812,7 +812,7 @@ static int convert_addr(struct sock_args *args, const char *_str,
sep++;
if (str_to_uint(sep, 1, pfx_len_max,
&args->prefix_len) != 0) {
- fprintf(stderr, "Invalid port\n");
+ fprintf(stderr, "Invalid prefix length\n");
return 1;
}
} else {
@@ -1272,7 +1272,7 @@ static int msg_loop(int client, int sd, void *addr, socklen_t alen,
}
}
- nfds = interactive ? MAX(fileno(stdin), sd) + 1 : sd + 1;
+ nfds = interactive ? MAX(fileno(stdin), sd) + 1 : sd + 1;
while (1) {
FD_ZERO(&rfds);
FD_SET(sd, &rfds);
@@ -1492,7 +1492,7 @@ static int lsock_init(struct sock_args *args)
sd = socket(args->version, args->type, args->protocol);
if (sd < 0) {
log_err_errno("Error opening socket");
- return -1;
+ return -1;
}
if (set_reuseaddr(sd) != 0)
@@ -1912,7 +1912,7 @@ static int ipc_parent(int cpid, int fd, struct sock_args *args)
* waiting to be told when to continue
*/
if (read(fd, &buf, sizeof(buf)) <= 0) {
- log_err_errno("Failed to read IPC status from status");
+ log_err_errno("Failed to read IPC status from pipe");
return 1;
}
if (!buf) {
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity
2025-06-15 8:48 [PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity Alok Tiwari
@ 2025-06-16 15:45 ` Simon Horman
2025-06-17 23:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-06-16 15:45 UTC (permalink / raw)
To: Alok Tiwari
Cc: davem, edumazet, kuba, pabeni, shuah, linux-kselftest, netdev,
linux-kernel, darren.kenny
On Sun, Jun 15, 2025 at 01:48:12AM -0700, Alok Tiwari wrote:
> This patch corrects several logging and error message in nettest.c:
> - Corrects function name in log messages "setsockopt" -> "getsockopt".
> - Closes missing parentheses in "setsockopt(IPV6_FREEBIND)".
> - Replaces misleading error text ("Invalid port") with the correct
> description ("Invalid prefix length").
> - remove Redundant wording like "status from status" and clarifies
> context in IPC error messages.
>
> These changes improve readability and aid in debugging test output.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> v1 ->v2
> remove extra space
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity
2025-06-15 8:48 [PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity Alok Tiwari
2025-06-16 15:45 ` Simon Horman
@ 2025-06-17 23:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-17 23:30 UTC (permalink / raw)
To: ALOK TIWARI
Cc: davem, edumazet, kuba, pabeni, horms, shuah, linux-kselftest,
netdev, linux-kernel, darren.kenny
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 15 Jun 2025 01:48:12 -0700 you wrote:
> This patch corrects several logging and error message in nettest.c:
> - Corrects function name in log messages "setsockopt" -> "getsockopt".
> - Closes missing parentheses in "setsockopt(IPV6_FREEBIND)".
> - Replaces misleading error text ("Invalid port") with the correct
> description ("Invalid prefix length").
> - remove Redundant wording like "status from status" and clarifies
> context in IPC error messages.
>
> [...]
Here is the summary with links:
- [v2] selftests: nettest: Fix typo in log and error messages for clarity
https://git.kernel.org/netdev/net-next/c/416b6030e39e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-17 23:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15 8:48 [PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity Alok Tiwari
2025-06-16 15:45 ` Simon Horman
2025-06-17 23:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).