summaryrefslogtreecommitdiffhomepage
path: root/pkg/errors/linuxerr
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-06-29 15:05:27 -0700
committergVisor bot <gvisor-bot@google.com>2021-06-29 15:08:46 -0700
commit54b71221c0b7a9159f369263ea6189bdba4eac3a (patch)
treee98758fee397eafad8373af92f3813e9fcc13e9b /pkg/errors/linuxerr
parentd205926f235258468bfe206388fa1b55cb1ea7fa (diff)
[syserror] Change syserror to linuxerr for E2BIG, EADDRINUSE, and EINVAL
Remove three syserror entries duplicated in linuxerr. Because of the linuxerr.Equals method, this is a mere change of return values from syserror to linuxerr definitions. Done with only these three errnos as CLs removing all grow to a significantly large size. PiperOrigin-RevId: 382173835
Diffstat (limited to 'pkg/errors/linuxerr')
-rw-r--r--pkg/errors/linuxerr/linuxerr_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/errors/linuxerr/linuxerr_test.go b/pkg/errors/linuxerr/linuxerr_test.go
index 62743c338..b1250d24f 100644
--- a/pkg/errors/linuxerr/linuxerr_test.go
+++ b/pkg/errors/linuxerr/linuxerr_test.go
@@ -44,7 +44,7 @@ func BenchmarkAssignLinuxerr(b *testing.B) {
func BenchmarkAssignSyserror(b *testing.B) {
for i := b.N; i > 0; i-- {
- globalError = syserror.EINVAL
+ globalError = linuxerr.ENOMSG
}
}
@@ -72,7 +72,7 @@ func BenchmarkCompareSyserror(b *testing.B) {
globalError = syserror.EAGAIN
j := 0
for i := b.N; i > 0; i-- {
- if globalError == syserror.EINVAL {
+ if globalError == syserror.EACCES {
j++
}
}
@@ -113,7 +113,7 @@ func BenchmarkSwitchSyserror(b *testing.B) {
j := 0
for i := b.N; i > 0; i-- {
switch globalError {
- case syserror.EINVAL:
+ case syserror.EACCES:
j++
case syserror.EINTR:
j += 2