selftests: reuseaddr_conflict: add missing new line at the end of the output
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/1 selftests: reuseaddr_conflict: add missing new line at the end of the output
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
---
Low risk and seems worth backporting to stable, hence the fixes tag.
--- tools/testing/selftests/net/reuseaddr_conflict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/reuseaddr_conflict.c +1 -1
@@ -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 ; }
Signature · 1 line
2.44.0
Quoted 6 lines · Jakub Kicinski
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
Quoted 7 lines
which should have been:
# Success
ok 1 selftests: net:reuseaddr_conflictFixes 422d8dc6fd3a ("selftest: add a reuseaddr test")Signed-off-by Jakub Kicinski <[email protected]>
Quoted 2 lines
---
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.
Quoted 20 lines
--- tools/testing/selftests/net/reuseaddr_conflict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/net/reuseaddr_conflict.c +1
-1@@ -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 ; }
Signature · 2 lines
BR, Muhammad Usama Anjum
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · 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_conflictwhich 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html