Skip to content

[LTS 8.6] selftests: reuseaddr_conflict: add missing new line at the end of the output #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: ciqlts8_6
Choose a base branch
from

Conversation

pvts-mat
Copy link
Contributor

@pvts-mat pvts-mat commented Jul 1, 2025

[LTS 8.6]

About

This commit fixes bad formatting for the net:reuseaddr_conflict test, which prevents automated tools from extracting the test's status.

Before:

TAP version 13
1..1
# selftests: net: reuseaddr_conflict
# Opening 127.0.0.1:9999
# Opening INADDR_ANY:9999
# bind: Address already in use
# Opening in6addr_any:9999
# Opening INADDR_ANY:9999
# bind: Address already in use
# Opening INADDR_ANY:9999 after closing ipv6 socket
# bind: Address already in use
# Successok 5 selftests: net: reuseaddr_conflict

After:

TAP version 13
1..1
# selftests: net: reuseaddr_conflict
# Opening 127.0.0.1:9999
# Opening INADDR_ANY:9999
# bind: Address already in use
# Opening in6addr_any:9999
# Opening INADDR_ANY:9999
# bind: Address already in use
# Opening INADDR_ANY:9999 after closing ipv6 socket
# bind: Address already in use
# Success
ok 1 selftests: net: reuseaddr_conflict

That it's a proper place for the newline (and not in some script executing the reuseaddr_conflict binary, for example) see similar tests from the same collection, eg:

int main(void)
{
test_proto(SOCK_DGRAM, "UDP");
test_proto(SOCK_STREAM, "TCP");
test_proto(SOCK_DCCP, "DCCP");
fprintf(stderr, "SUCCESS\n");
return 0;
}

fprintf(stderr, "SUCCESS\n");
return 0;

PS

Turned out there is already a 3197412 fix in the mainline targeting exactly this issue. Switched to that commit's cherry-pick instead of the manual change.

@pvts-mat pvts-mat force-pushed the ciqlts8_6-kselftests-reuseaddr_conflict-format-fix branch from c7851c1 to 4109806 Compare July 1, 2025 14:48
@pvts-mat pvts-mat changed the title [LTS 8.6] selftests: net:reuseaddr_conflict: fix success message formatting [LTS 8.6] selftests: reuseaddr_conflict: add missing new line at the end of the output Jul 1, 2025
Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did this get indented some how?

    commit-author Jakub Kicinski <[email protected]>
    commit https://github.com/ctrliq/kernel-src-tree/commit/31974122cfdeaf56abc18d8ab740d580d9833e90

I would prefer them to be aligned to start of line.

Otherwise this looks good and I"m glad there is a blank line between the header and the body summary from upstream.

@pvts-mat
Copy link
Contributor Author

pvts-mat commented Jul 2, 2025

did this get indented some how?

Oops, sorry. No intent for the indent. Let me fix that real quick

… output

commit-author Jakub Kicinski <[email protected]>
commit 3197412

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: 422d8dc ("selftest: add a reuseaddr test")
        Reviewed-by: Muhammad Usama Anjum <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
        Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit 3197412)
        Signed-off-by: Marcin Wcisło <[email protected]>
@pvts-mat pvts-mat force-pushed the ciqlts8_6-kselftests-reuseaddr_conflict-format-fix branch from 4109806 to a108827 Compare July 2, 2025 20:58
Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link

@thefossguy-ciq thefossguy-ciq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚤

Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants