Skip to content
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

fix(net,linux): fix decodeaddress if Big Endian #1322

Merged
merged 3 commits into from Jul 9, 2022

Conversation

shirou
Copy link
Owner

@shirou shirou commented Jul 2, 2022

fixes #990

Check endian when decode address.

@shirou shirou mentioned this pull request Jul 2, 2022
@zhsj
Copy link

zhsj commented Jul 2, 2022

With this patch, Test_Connections pass on s390x, but a new test fails:

--- FAIL: TestDecodeAddress (0.00s)
    net_linux_test.go:173:
                Error Trace:    net_linux_test.go:173
                Error:          Not equal:
                                expected: "10.0.0.5"
                                actual  : "5.0.0.10"

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -10.0.0.5
                                +5.0.0.10
                Test:           TestDecodeAddress
                Messages:       0500000A:0016
    net_linux_test.go:173:
                Error Trace:    net_linux_test.go:173
                Error:          Not equal:
                                expected: "127.0.0.1"
                                actual  : "1.0.0.127"

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -127.0.0.1
                                +1.0.0.127
                Test:           TestDecodeAddress
                Messages:       0100007F:D1C2
FAIL

@shirou
Copy link
Owner Author

shirou commented Jul 3, 2022

@zhsj fix tests. Could you try again?

@zhsj
Copy link

zhsj commented Jul 3, 2022

Now the tests have passed, except TestCpuInfo, but it's unrelated to this PR.

net/net.go Outdated Show resolved Hide resolved
@shirou shirou merged commit cb1120d into master Jul 9, 2022
@shirou shirou deleted the feature/net_fix_big_endian branch July 9, 2022 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s390x support
3 participants