diff mbox series

[net] selftests: reuseaddr_conflict: add missing new line at the end of the output

Message ID 20240329160559.249476-1-kuba@kernel.org (mailing list archive)
State Accepted
Commit 31974122cfdeaf56abc18d8ab740d580d9833e90
Delegated to: Netdev Maintainers
Headers show
Series [net] selftests: reuseaddr_conflict: add missing new line at the end of the output | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-31--03-00 (tests: 953)

Commit Message

Jakub Kicinski March 29, 2024, 4:05 p.m. UTC
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(-)

Comments

Muhammad Usama Anjum March 29, 2024, 7:35 p.m. UTC | #1
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;
>  }
patchwork-bot+netdevbpf@kernel.org April 2, 2024, 4:20 a.m. UTC | #2
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!
diff mbox series

Patch

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;
 }