summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9/client_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/p9/client_test.go')
-rw-r--r--pkg/p9/client_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/p9/client_test.go b/pkg/p9/client_test.go
index b78fdab7a..24e0dd7e8 100644
--- a/pkg/p9/client_test.go
+++ b/pkg/p9/client_test.go
@@ -15,9 +15,9 @@
package p9
import (
- "syscall"
"testing"
+ "golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/unet"
)
@@ -41,23 +41,23 @@ func TestVersion(t *testing.T) {
}
// Check a bogus version string.
- if err := c.sendRecv(&Tversion{Version: "notokay", MSize: DefaultMessageSize}, &Rversion{}); err != syscall.EINVAL {
- t.Errorf("got %v expected %v", err, syscall.EINVAL)
+ if err := c.sendRecv(&Tversion{Version: "notokay", MSize: DefaultMessageSize}, &Rversion{}); err != unix.EINVAL {
+ t.Errorf("got %v expected %v", err, unix.EINVAL)
}
// Check a bogus version number.
- if err := c.sendRecv(&Tversion{Version: "9P1000.L", MSize: DefaultMessageSize}, &Rversion{}); err != syscall.EINVAL {
- t.Errorf("got %v expected %v", err, syscall.EINVAL)
+ if err := c.sendRecv(&Tversion{Version: "9P1000.L", MSize: DefaultMessageSize}, &Rversion{}); err != unix.EINVAL {
+ t.Errorf("got %v expected %v", err, unix.EINVAL)
}
// Check a too high version number.
- if err := c.sendRecv(&Tversion{Version: versionString(highestSupportedVersion + 1), MSize: DefaultMessageSize}, &Rversion{}); err != syscall.EAGAIN {
- t.Errorf("got %v expected %v", err, syscall.EAGAIN)
+ if err := c.sendRecv(&Tversion{Version: versionString(highestSupportedVersion + 1), MSize: DefaultMessageSize}, &Rversion{}); err != unix.EAGAIN {
+ t.Errorf("got %v expected %v", err, unix.EAGAIN)
}
// Check an invalid MSize.
- if err := c.sendRecv(&Tversion{Version: versionString(highestSupportedVersion), MSize: 0}, &Rversion{}); err != syscall.EINVAL {
- t.Errorf("got %v expected %v", err, syscall.EINVAL)
+ if err := c.sendRecv(&Tversion{Version: versionString(highestSupportedVersion), MSize: 0}, &Rversion{}); err != unix.EINVAL {
+ t.Errorf("got %v expected %v", err, unix.EINVAL)
}
}