Skip to content

Commit fda5168

Browse files
skladdtklauser
authored andcommitted
unix: fix AF_CAN tests for big endian systems
see discussion in https://go-review.googlesource.com/c/sys/+/248977 Change-Id: I25dff34d2a6587d0b02836d7e2c9c40e08378731 GitHub-Last-Rev: 33cf644 GitHub-Pull-Request: #81 Reviewed-on: https://go-review.googlesource.com/c/sys/+/249743 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Reviewed-by: Matt Layher <[email protected]>
1 parent 1fb7954 commit fda5168

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

unix/syscall_internal_linux_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@ func Test_anyToSockaddr(t *testing.T) {
174174
Family: AF_CAN,
175175
Ifindex: 12345678,
176176
Addr: [16]byte{
177-
0x89, 0x67, 0x45, 0x23,
178-
0x90, 0x78, 0x56, 0x34,
177+
0xAA, 0xAA, 0xAA, 0xAA,
178+
0xBB, 0xBB, 0xBB, 0xBB,
179179
0x0, 0x0, 0x0, 0x0,
180180
0x0, 0x0, 0x0, 0x0,
181181
},
182182
}),
183183
sa: &SockaddrCAN{
184184
Ifindex: 12345678,
185-
RxID: 0x23456789,
186-
TxID: 0x34567890,
185+
RxID: 0xAAAAAAAA,
186+
TxID: 0xBBBBBBBB,
187187
},
188188
},
189189
{
@@ -573,15 +573,15 @@ func TestSockaddrCAN_sockaddr(t *testing.T) {
573573
name: "with ids",
574574
sa: &SockaddrCAN{
575575
Ifindex: 12345678,
576-
RxID: 0x23456789,
577-
TxID: 0x34567890,
576+
RxID: 0xAAAAAAAA,
577+
TxID: 0xBBBBBBBB,
578578
},
579579
raw: &RawSockaddrCAN{
580580
Family: AF_CAN,
581581
Ifindex: 12345678,
582582
Addr: [16]byte{
583-
0x89, 0x67, 0x45, 0x23,
584-
0x90, 0x78, 0x56, 0x34,
583+
0xAA, 0xAA, 0xAA, 0xAA,
584+
0xBB, 0xBB, 0xBB, 0xBB,
585585
0x0, 0x0, 0x0, 0x0,
586586
0x0, 0x0, 0x0, 0x0,
587587
},

0 commit comments

Comments
 (0)