netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] selftests: reuseaddr_conflict: add missing new line at the end of the output
@ 2024-03-29 16:05 Jakub Kicinski
  2024-03-29 19:35 ` Muhammad Usama Anjum
  2024-04-02  4:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-03-29 16:05 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, Jakub Kicinski, shuah, jbacik,
	linux-kselftest

The netdev CI runs in a VM and captures serial, so stdout and
stderr get combined. Because there's a missing new line in
stderr the test ends up corrupting KTAP:

  # Successok 1 selftests: net: reuseaddr_conflict

which should have been:

  # Success
  ok 1 selftests: net: reuseaddr_conflict

Fixes: 422d8dc6fd3a ("selftest: add a reuseaddr test")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
Low risk and seems worth backporting to stable, hence the fixes tag.

CC: shuah@kernel.org
CC: jbacik@fb.com
CC: linux-kselftest@vger.kernel.org
---
 tools/testing/selftests/net/reuseaddr_conflict.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/reuseaddr_conflict.c b/tools/testing/selftests/net/reuseaddr_conflict.c
index 7c5b12664b03..bfb07dc49518 100644
--- a/tools/testing/selftests/net/reuseaddr_conflict.c
+++ b/tools/testing/selftests/net/reuseaddr_conflict.c
@@ -109,6 +109,6 @@ int main(void)
 	fd1 = open_port(0, 1);
 	if (fd1 >= 0)
 		error(1, 0, "Was allowed to create an ipv4 reuseport on an already bound non-reuseport socket with no ipv6");
-	fprintf(stderr, "Success");
+	fprintf(stderr, "Success\n");
 	return 0;
 }
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: reuseaddr_conflict: add missing new line at the end of the output
  2024-03-29 16:05 [PATCH net] selftests: reuseaddr_conflict: add missing new line at the end of the output Jakub Kicinski
@ 2024-03-29 19:35 ` Muhammad Usama Anjum
  2024-04-02  4:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Muhammad Usama Anjum @ 2024-03-29 19:35 UTC (permalink / raw)
  To: Jakub Kicinski, davem
  Cc: Muhammad Usama Anjum, netdev, edumazet, pabeni, shuah, jbacik,
	linux-kselftest

On 3/29/24 9:05 PM, Jakub Kicinski wrote:
> The netdev CI runs in a VM and captures serial, so stdout and
> stderr get combined. Because there's a missing new line in
> stderr the test ends up corrupting KTAP:
> 
>   # Successok 1 selftests: net: reuseaddr_conflict
> 
> which should have been:
> 
>   # Success
>   ok 1 selftests: net: reuseaddr_conflict
> 
> Fixes: 422d8dc6fd3a ("selftest: add a reuseaddr test")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

> ---
> Low risk and seems worth backporting to stable, hence the fixes tag.
Agreed to back port it as ok or not ok must appear at the start of the line
to indicate the status of the test.

> 
> CC: shuah@kernel.org
> CC: jbacik@fb.com
> CC: linux-kselftest@vger.kernel.org
> ---
>  tools/testing/selftests/net/reuseaddr_conflict.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/reuseaddr_conflict.c b/tools/testing/selftests/net/reuseaddr_conflict.c
> index 7c5b12664b03..bfb07dc49518 100644
> --- a/tools/testing/selftests/net/reuseaddr_conflict.c
> +++ b/tools/testing/selftests/net/reuseaddr_conflict.c
> @@ -109,6 +109,6 @@ int main(void)
>  	fd1 = open_port(0, 1);
>  	if (fd1 >= 0)
>  		error(1, 0, "Was allowed to create an ipv4 reuseport on an already bound non-reuseport socket with no ipv6");
> -	fprintf(stderr, "Success");
> +	fprintf(stderr, "Success\n");
>  	return 0;
>  }

-- 
BR,
Muhammad Usama Anjum

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: reuseaddr_conflict: add missing new line at the end of the output
  2024-03-29 16:05 [PATCH net] selftests: reuseaddr_conflict: add missing new line at the end of the output Jakub Kicinski
  2024-03-29 19:35 ` Muhammad Usama Anjum
@ 2024-04-02  4:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-02  4:20 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, shuah, jbacik, linux-kselftest

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 29 Mar 2024 09:05:59 -0700 you wrote:
> The netdev CI runs in a VM and captures serial, so stdout and
> stderr get combined. Because there's a missing new line in
> stderr the test ends up corrupting KTAP:
> 
>   # Successok 1 selftests: net: reuseaddr_conflict
> 
> which should have been:
> 
> [...]

Here is the summary with links:
  - [net] selftests: reuseaddr_conflict: add missing new line at the end of the output
    https://git.kernel.org/netdev/net/c/31974122cfde

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:[~2024-04-02  4:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 16:05 [PATCH net] selftests: reuseaddr_conflict: add missing new line at the end of the output Jakub Kicinski
2024-03-29 19:35 ` Muhammad Usama Anjum
2024-04-02  4:20 ` 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).