From 8a2f7e716dcc62f04d2808e8ade34941c94fc956 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Mon, 29 Mar 2021 13:28:32 -0700 Subject: [syserror] Split usermem package Split usermem package to help remove syserror dependency in go_marshal. New hostarch package contains code not dependent on syserror. PiperOrigin-RevId: 365651233 --- test/packetimpact/tests/tcp_info_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/packetimpact/tests/tcp_info_test.go') diff --git a/test/packetimpact/tests/tcp_info_test.go b/test/packetimpact/tests/tcp_info_test.go index 3fc2c7fe5..93f58ec49 100644 --- a/test/packetimpact/tests/tcp_info_test.go +++ b/test/packetimpact/tests/tcp_info_test.go @@ -22,8 +22,8 @@ import ( "golang.org/x/sys/unix" "gvisor.dev/gvisor/pkg/abi/linux" "gvisor.dev/gvisor/pkg/binary" + "gvisor.dev/gvisor/pkg/hostarch" "gvisor.dev/gvisor/pkg/tcpip/header" - "gvisor.dev/gvisor/pkg/usermem" "gvisor.dev/gvisor/test/packetimpact/testbench" ) @@ -58,7 +58,7 @@ func TestTCPInfo(t *testing.T) { if got, want := len(infoBytes), linux.SizeOfTCPInfo; got != want { t.Fatalf("expected %T, got %d bytes want %d bytes", info, got, want) } - binary.Unmarshal(infoBytes, usermem.ByteOrder, &info) + binary.Unmarshal(infoBytes, hostarch.ByteOrder, &info) rtt := time.Duration(info.RTT) * time.Microsecond rttvar := time.Duration(info.RTTVar) * time.Microsecond @@ -99,7 +99,7 @@ func TestTCPInfo(t *testing.T) { if got, want := len(infoBytes), linux.SizeOfTCPInfo; got != want { t.Fatalf("expected %T, got %d bytes want %d bytes", info, got, want) } - binary.Unmarshal(infoBytes, usermem.ByteOrder, &info) + binary.Unmarshal(infoBytes, hostarch.ByteOrder, &info) if info.CaState != linux.TCP_CA_Loss { t.Errorf("expected the connection to be in loss recovery, got: %v want: %v", info.CaState, linux.TCP_CA_Loss) } -- cgit v1.2.3