summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9/client_test.go
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-04-10 11:35:38 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-10 11:36:57 -0700
commit8bb8027d55d59c9c08e4b7896cf688c0225a1244 (patch)
tree9530f6d6ac0901f4f4f7a5b2fec74874e5cd47a9 /pkg/p9/client_test.go
parent1798d6cbee3360b09d3736069e15fd746e863bd2 (diff)
Return EIO from p9 if sending/receiving fails.
Continues the modifications in cl/272963663. This prevents non-syscall errors from being propogated to kernel/task_syscall.go:ExtractErrno(), which causes a sentry panic. PiperOrigin-RevId: 305913127
Diffstat (limited to 'pkg/p9/client_test.go')
-rw-r--r--pkg/p9/client_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/p9/client_test.go b/pkg/p9/client_test.go
index 29a0afadf..c757583e0 100644
--- a/pkg/p9/client_test.go
+++ b/pkg/p9/client_test.go
@@ -96,7 +96,12 @@ func benchmarkSendRecv(b *testing.B, fn func(c *Client) func(message, message) e
}
func BenchmarkSendRecvLegacy(b *testing.B) {
- benchmarkSendRecv(b, func(c *Client) func(message, message) error { return c.sendRecvLegacy })
+ benchmarkSendRecv(b, func(c *Client) func(message, message) error {
+ return func(t message, r message) error {
+ _, err := c.sendRecvLegacy(t, r)
+ return err
+ }
+ })
}
func BenchmarkSendRecvChannel(b *testing.B) {