Skip to content

Commit ed53586

Browse files
tannevaledclaude
andauthored
vm: map every Win32 and Winsock code through MRI's errmap (#982)
* vm: map every Win32 and Winsock code through MRI's errmap (#980) On Windows a syscall.Errno is the Win32 code itself, and errnoClasses is keyed by the numbers Go gives the POSIX names, so every raiser that looked a failed call's number up directly picked an unrelated class, or none. ERROR_PATH_NOT_FOUND (3) is Go's syscall.ENOTDIR there, so a path through a missing directory read as Errno::ENOTDIR where MRI raises Errno::ENOENT (witnessed on #978's Windows runner, for the flush), and rmdir of a non-empty directory (ERROR_DIR_NOT_EMPTY) fell to Errno::ENOENT. MRI maps the code first, through errmap and rb_w32_map_errno (win32/win32.c:145-300, v4.0.9). errnoOfError now does the same, once, so sysFail, chdir, realpath, pwrite, the flush and the dial error all see MRI's class. errIsErrno falls back on the mapped class, so ERROR_DIR_NOT_EMPTY is ENOTEMPTY for rmdir, and the two direct errors.Is(err, syscall.EINVAL) checks (File.truncate, flock) go through it. The Winsock rows are ported in full (43, where posixErrno held 15), and posixErrno is gone. Eight of their classes have no number in rbgo on any target (ESHUTDOWN, ETOOMANYREFS, EHOSTDOWN, EPFNOSUPPORT, ESOCKTNOSUPPORT, EPROCLIM, EUSERS, EREMOTE); those keep the WSA code and raise SystemCallError, as before. TestWSARowsWithoutAClass pins that list. Everywhere but Windows mapHostErrno is the identity. Fixes #980 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: pick host error codes by the errno they MAP to Three tests fed raw syscall.Errno values and read the class raised. On Windows the class now follows rb_w32_map_errno, so: - the "unclaimed errno" pickers in TestRaiseChdirErrFallbacks and TestRaiseDialErrFallbacks chose 1, ERROR_INVALID_FUNCTION, which maps to EINVAL and raises Errno::EINVAL; - TestRealpathSyscallErr fed syscall.ENOTDIR, which is 3 there (ERROR_PATH_NOT_FOUND) and maps to ENOENT, as in MRI. unclaimedHostErrno and hostErrnoFor scan host codes through mapHostErrno, up to 1<<16 since only codes from 10000 up are kept unmapped on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e13fd48 commit ed53586

15 files changed

Lines changed: 271 additions & 136 deletions

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ What a target lacks, rbgo leaves out the way MRI does:
906906

907907
- **The store gems** — SQLite3, Sequel, ActiveRecord's adapter, Bolt, Bleve, Etcd and Confd — need modernc.org/sqlite, which has a port for darwin/{amd64,arm64}, freebsd/{386,amd64,arm,arm64}, linux/{386,amd64,arm,arm64,loong64,ppc64le,riscv64,s390x}, netbsd/amd64, openbsd/{amd64,arm64} and windows. Elsewhere (wasm included) `require` still works and the modules exist, and the first real operation raises `NotImplementedError: sqlite3 is not supported on linux/mips64le` (or the gem and target in question).
908908
- **Errno**: a name the system's `<errno.h>` lacks is still a constant, naming `Errno::NOERROR`, as MRI's `undefined_error` does: `EMULTIHOP` and `ENOLINK` on OpenBSD, `ENOTRECOVERABLE` and `EOWNERDEAD` on NetBSD and DragonFly.
909+
- **Errno on Windows**: a failed call's Win32 or Winsock code picks its class through MRI's own table (`errmap` and `rb_w32_map_errno` in `win32/win32.c`), so a missing directory is `Errno::ENOENT` and a refused connection `Errno::ECONNREFUSED`, as under MRI; a Win32 code absent from the table is `Errno::EINVAL`. Eight Winsock rows (`ESHUTDOWN`, `ETOOMANYREFS`, `EHOSTDOWN`, `EPFNOSUPPORT`, `ESOCKTNOSUPPORT`, `EPROCLIM`, `EUSERS`, `EREMOTE`) name classes rbgo has no number for on any target, so those failures raise plain `SystemCallError` ([#980](https://github.com/go-embedded-ruby/ruby/issues/980)).
909910
- **`Process::RLIMIT_*`** exist only where the system has the resource: no `RLIMIT_AS` on OpenBSD, no `RLIMIT_MEMLOCK` on AIX, only `RLIMIT_AS` of the four optional ones on Solaris and illumos.
910911
- **`File#flock`** and PStore's lock use `flock(2)`; AIX has none, so there it is emulated with `fcntl(2)` record locks, exactly as MRI's `missing/flock.c` does.
911912
- **plan9 (386, amd64, arm) compiles and vets, and is untested at run time.** Its `syscall` package has no errno numbers (`syscall.EINVAL` is a string error there), no `Kill`, `Flock`, `Getrlimit`, `Umask` or `Stat_t`, so rbgo has a plan9 variant of each seam. Nothing has been run on a Plan 9 kernel; the one part with tests is the error-string mapping, which is pure Go and runs on every platform. What that means:

‎internal/vm/dir_getwd_internal_test.go‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,7 @@ func checkGetcwdFailure(t *testing.T, label string, got RubyError, wantClass, wa
9898
// every failure before #681.
9999
func TestRaiseChdirErrFallbacks(t *testing.T) {
100100
// An errno number no platform table claims: no class, so SystemCallError.
101-
unclaimed := syscall.Errno(0)
102-
for n := syscall.Errno(1); n < 4096; n++ {
103-
if _, ok := errnoClasses[int64(n)]; !ok {
104-
unclaimed = n
105-
break
106-
}
107-
}
108-
if unclaimed == 0 {
109-
t.Skip("every errno below 4096 has a class on this platform")
110-
}
101+
unclaimed := unclaimedHostErrno(t)
111102
got := caughtRaise(t, func() { raiseChdirErr(unclaimed, "/p") })
112103
if got.Class != "SystemCallError" {
113104
t.Errorf("unclaimed errno %d: class %q, want SystemCallError", unclaimed, got.Class)

‎internal/vm/errno_host.go‎

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,37 @@ import (
1616
// *os.SyscallError, *net.OpError …). ok is false for an error with no errno
1717
// behind it. The Plan 9 counterpart (errno_plan9.go) has no numbers to dig out and
1818
// derives one from the error string instead.
19+
//
20+
// The number is the one of the class MRI raises, which on Windows is not the
21+
// code the call failed with: a Windows syscall.Errno is the Win32 code itself,
22+
// and MRI maps it through rb_w32_map_errno before anything raises it, so
23+
// ERROR_PATH_NOT_FOUND (3) is Errno::ENOENT. mapHostErrno does that mapping
24+
// there and is the identity elsewhere. Doing it here, once, means no raiser can
25+
// look a raw Win32 code up in errnoClasses (go-embedded-ruby/ruby#980).
26+
//
27+
// ⚠ Windows: Go defines syscall.ENOENT as ERROR_FILE_NOT_FOUND (2) and
28+
// syscall.ENOTDIR as ERROR_PATH_NOT_FOUND (3), so an ENOTDIR that Go builds
29+
// itself (os.MkdirAll through a file, os.ReadDir on one, filepath.EvalSymlinks)
30+
// is the very number Windows uses for a missing path, and is mapped to ENOENT
31+
// as MRI maps that code. No raiser here takes its error from those three
32+
// today; one that does must decide the class itself.
1933
func errnoOfError(err error) (int64, bool) {
2034
var eno syscall.Errno
2135
if errors.As(err, &eno) {
22-
return int64(eno), true
36+
return mapHostErrno(int64(eno)), true
2337
}
2438
return 0, false
2539
}
2640

2741
// errIsErrno reports whether err is the Errno class `name` (an errnoNumbers key):
28-
// errors.Is against the host's syscall.Errno of that number, so it answers exactly
29-
// what errors.Is(err, syscall.<name>) would. It exists so the call sites compile
30-
// on Plan 9, whose syscall package lacks most of those constants.
42+
// whether errnoOfError maps it to that class's number. Off Windows that is
43+
// errors.Is(err, syscall.<name>) for the first errno in the chain; on Windows
44+
// it also sees that ERROR_DIR_NOT_EMPTY is ENOTEMPTY, which errors.Is cannot.
45+
// It exists so the call sites compile on Plan 9, whose syscall package lacks
46+
// most of those constants.
3147
func errIsErrno(err error, name string) bool {
32-
return errors.Is(err, syscall.Errno(errnoNumbers[name]))
48+
eno, ok := errnoOfError(err)
49+
return ok && eno == errnoNumbers[name]
3350
}
3451

3552
// errnoText is the message sysFail embeds for an errno: errnoMessage of the host's
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Copyright (c) the go-embedded-ruby/ruby authors
2+
//
3+
// SPDX-License-Identifier: BSD-3-Clause
4+
5+
package vm
6+
7+
import (
8+
"syscall"
9+
"testing"
10+
)
11+
12+
// hostErrnoSearchLimit bounds the scans below. On Windows a host code below
13+
// 10000 that rb_w32_map_errno's table does not list becomes EINVAL, and a code
14+
// from 10000 up is kept as it is, so an unclaimed code exists only up there.
15+
const hostErrnoSearchLimit = 1 << 16
16+
17+
// unclaimedHostErrno returns a host error code whose MAPPED errno has no
18+
// Errno::Exxx class, which is what decides the class raised. Testing the raw
19+
// number instead picked 1 on Windows, which is ERROR_INVALID_FUNCTION there and
20+
// maps to EINVAL (go-embedded-ruby/ruby#982's windows lane).
21+
func unclaimedHostErrno(t *testing.T) syscall.Errno {
22+
t.Helper()
23+
for n := syscall.Errno(1); n < hostErrnoSearchLimit; n++ {
24+
if _, ok := errnoClasses[mapHostErrno(int64(n))]; !ok {
25+
return n
26+
}
27+
}
28+
t.Skipf("every host code below %d maps to an errno with a class", hostErrnoSearchLimit)
29+
return 0
30+
}
31+
32+
// hostErrnoFor returns the smallest host error code that maps to the errno
33+
// named. That is the code itself on POSIX hosts. On Windows syscall.ENOTDIR is
34+
// 3, ERROR_PATH_NOT_FOUND, which MRI maps to ENOENT; ENOTDIR comes from another
35+
// code (ERROR_DIRECTORY).
36+
func hostErrnoFor(t *testing.T, name string) syscall.Errno {
37+
t.Helper()
38+
want, ok := errnoNumbers[name]
39+
if !ok {
40+
t.Fatalf("%s has no number on this platform", name)
41+
}
42+
for n := syscall.Errno(1); n < hostErrnoSearchLimit; n++ {
43+
if mapHostErrno(int64(n)) == want {
44+
return n
45+
}
46+
}
47+
t.Fatalf("no host code below %d maps to %s", hostErrnoSearchLimit, name)
48+
return 0
49+
}

‎internal/vm/errno_mapped_test.go‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) the go-embedded-ruby/ruby authors
2+
//
3+
// SPDX-License-Identifier: BSD-3-Clause
4+
5+
package vm_test
6+
7+
import "testing"
8+
9+
// TestAFailedCallRaisesMRIsClassOnEveryHost (go-embedded-ruby/ruby#980): the
10+
// expected output is MRI 4.0.7's on darwin, and MRI raises the same classes on
11+
// Windows because it maps each Win32 code through errmap first. These are the
12+
// rows where the raw Win32 code named another class, or none:
13+
//
14+
// - a path through a missing directory fails with ERROR_PATH_NOT_FOUND (3),
15+
// which is Go's syscall.ENOTDIR on Windows, so it read as Errno::ENOTDIR;
16+
// - rmdir of a non-empty directory fails with ERROR_DIR_NOT_EMPTY (145),
17+
// which errors.Is never matched to ENOTEMPTY, so it fell to Errno::ENOENT.
18+
//
19+
// On the POSIX lanes these pass with or without the mapping; the Windows lane
20+
// is the one that says whether it holds.
21+
func TestAFailedCallRaisesMRIsClassOnEveryHost(t *testing.T) {
22+
checkCases(t, []runCase{
23+
{`require "tmpdir"
24+
Dir.mktmpdir do |d|
25+
begin
26+
Dir.chdir(File.join(d, "missing", "sub"))
27+
rescue SystemCallError => e
28+
p e.class
29+
end
30+
full = File.join(d, "full")
31+
Dir.mkdir(full)
32+
File.write(File.join(full, "f"), "x")
33+
begin
34+
Dir.rmdir(full)
35+
rescue SystemCallError => e
36+
p e.class
37+
end
38+
begin
39+
File.truncate(File.join(d, "missing", "sub"), 0)
40+
rescue SystemCallError => e
41+
p e.class
42+
end
43+
end`, "Errno::ENOENT\nErrno::ENOTEMPTY\nErrno::ENOENT\n"},
44+
})
45+
}

‎internal/vm/errno_win32_windows.go‎

Lines changed: 90 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ import (
2020
//
2121
// ERROR_INVALID_HANDLE appears twice in errmap, as EBADF and then EINVAL; the
2222
// first row is the one rb_w32_map_errno's loop returns, so it alone is here.
23-
// The WSA rows are left out: their codes are at or above WSABASEERR, which
24-
// mapHostErrno keeps as they are, as rb_w32_map_errno does for a WSA code
25-
// absent from the table.
23+
// The WSA rows are wsaErrnos.
2624
var win32Errnos = map[syscall.Errno]string{
2725
windows.ERROR_INVALID_FUNCTION: "EINVAL",
2826
windows.ERROR_FILE_NOT_FOUND: "ENOENT",
@@ -111,19 +109,102 @@ var win32Errnos = map[syscall.Errno]string{
111109
windows.ERROR_CANT_RESOLVE_FILENAME: "ELOOP",
112110
}
113111

114-
// wsaBaseErr is WSABASEERR: from there up a code is a socket error, or one of
115-
// the numbers Go invented for the POSIX names, and is kept as it is.
112+
// wsaErrnos is the rest of MRI's errmap (win32/win32.c:235-277, v4.0.9): the
113+
// Winsock rows, all 43 of them, in errmap's order. A socket call fails with
114+
// one of these, so without them a refused connection is a bare
115+
// SystemCallError where MRI raises Errno::ECONNREFUSED.
116+
//
117+
// Eight targets (EHOSTDOWN, EPFNOSUPPORT, EPROCLIM, EREMOTE, ESHUTDOWN,
118+
// ESOCKTNOSUPPORT, ETOOMANYREFS, EUSERS) have no number in rbgo on any
119+
// target (errnoUndefinedEverywhere), so no class to land in: mapHostErrno
120+
// keeps the WSA code for them, which raises SystemCallError, until the
121+
// per-platform errno tables define them. TestWSARowsWithoutAClass pins that
122+
// list, so defining one shows up there.
123+
var wsaErrnos = map[syscall.Errno]string{
124+
windows.WSAEINTR: "EINTR",
125+
windows.WSAEBADF: "EBADF",
126+
windows.WSAEACCES: "EACCES",
127+
windows.WSAEFAULT: "EFAULT",
128+
windows.WSAEINVAL: "EINVAL",
129+
windows.WSAEMFILE: "EMFILE",
130+
windows.WSAEWOULDBLOCK: "EWOULDBLOCK",
131+
windows.WSAEINPROGRESS: "EINPROGRESS",
132+
windows.WSAEALREADY: "EALREADY",
133+
windows.WSAENOTSOCK: "ENOTSOCK",
134+
windows.WSAEDESTADDRREQ: "EDESTADDRREQ",
135+
windows.WSAEMSGSIZE: "EMSGSIZE",
136+
windows.WSAEPROTOTYPE: "EPROTOTYPE",
137+
windows.WSAENOPROTOOPT: "ENOPROTOOPT",
138+
windows.WSAEPROTONOSUPPORT: "EPROTONOSUPPORT",
139+
windows.WSAESOCKTNOSUPPORT: "ESOCKTNOSUPPORT",
140+
windows.WSAEOPNOTSUPP: "EOPNOTSUPP",
141+
windows.WSAEPFNOSUPPORT: "EPFNOSUPPORT",
142+
windows.WSAEAFNOSUPPORT: "EAFNOSUPPORT",
143+
windows.WSAEADDRINUSE: "EADDRINUSE",
144+
windows.WSAEADDRNOTAVAIL: "EADDRNOTAVAIL",
145+
windows.WSAENETDOWN: "ENETDOWN",
146+
windows.WSAENETUNREACH: "ENETUNREACH",
147+
windows.WSAENETRESET: "ENETRESET",
148+
windows.WSAECONNABORTED: "ECONNABORTED",
149+
windows.WSAECONNRESET: "ECONNRESET",
150+
windows.WSAENOBUFS: "ENOBUFS",
151+
windows.WSAEISCONN: "EISCONN",
152+
windows.WSAENOTCONN: "ENOTCONN",
153+
windows.WSAESHUTDOWN: "ESHUTDOWN",
154+
windows.WSAETOOMANYREFS: "ETOOMANYREFS",
155+
windows.WSAETIMEDOUT: "ETIMEDOUT",
156+
windows.WSAECONNREFUSED: "ECONNREFUSED",
157+
windows.WSAELOOP: "ELOOP",
158+
windows.WSAENAMETOOLONG: "ENAMETOOLONG",
159+
windows.WSAEHOSTDOWN: "EHOSTDOWN",
160+
windows.WSAEHOSTUNREACH: "EHOSTUNREACH",
161+
windows.WSAEPROCLIM: "EPROCLIM",
162+
windows.WSAENOTEMPTY: "ENOTEMPTY",
163+
windows.WSAEUSERS: "EUSERS",
164+
windows.WSAEDQUOT: "EDQUOT",
165+
windows.WSAESTALE: "ESTALE",
166+
windows.WSAEREMOTE: "EREMOTE",
167+
}
168+
169+
// wsaBaseErr is WSABASEERR: from there up a code absent from errmap is a
170+
// socket error MRI has no class for, or one of the numbers Go invented for the
171+
// POSIX names, and is kept as it is.
116172
const wsaBaseErr = 10000
117173

118174
// mapHostErrno is rb_w32_map_errno: the errno number of the class MRI raises
119175
// for the Win32 code eno. A code in errmap gets its class; a code at or above
120-
// WSABASEERR is kept; any other code is EINVAL.
176+
// WSABASEERR is kept; any other code is EINVAL. A row whose class rbgo has no
177+
// number for keeps the code too (see wsaErrnos).
121178
func mapHostErrno(eno int64) int64 {
122-
if eno == 0 || eno >= wsaBaseErr {
179+
if eno == 0 {
180+
return 0
181+
}
182+
name, ok := win32Errnos[syscall.Errno(eno)]
183+
if !ok {
184+
name, ok = wsaErrnos[syscall.Errno(eno)]
185+
}
186+
if ok {
187+
if n, ok := errnoNumberOf(name); ok {
188+
return n
189+
}
123190
return eno
124191
}
125-
if name, ok := win32Errnos[syscall.Errno(eno)]; ok {
126-
return errnoNumbers[name]
192+
if eno >= wsaBaseErr {
193+
return eno
127194
}
128195
return errnoNumbers["EINVAL"]
129196
}
197+
198+
// errnoNumberOf is the number of the Errno class `name` names on this target:
199+
// its own, or the one an alias (EWOULDBLOCK) shares. ok is false for a name
200+
// with no number here.
201+
func errnoNumberOf(name string) (int64, bool) {
202+
if n, ok := errnoNumbers[name]; ok {
203+
return n, true
204+
}
205+
if a, ok := errnoAliases[name]; ok {
206+
n, ok := errnoNumbers[a]
207+
return n, ok
208+
}
209+
return 0, false
210+
}

‎internal/vm/errno_win32_windows_internal_test.go‎

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package vm
88

99
import (
10+
"os"
1011
"syscall"
1112
"testing"
1213

@@ -35,6 +36,14 @@ func TestMapHostErrnoIsRbW32MapErrno(t *testing.T) {
3536
{windows.ERROR_INVALID_NAME, "EINVAL"},
3637
// A number Go invented for a POSIX name: kept.
3738
{syscall.ENOENT, "ENOENT"},
39+
// The Winsock rows (go-embedded-ruby/ruby#980).
40+
{windows.WSAECONNRESET, "ECONNRESET"},
41+
{windows.WSAECONNREFUSED, "ECONNREFUSED"},
42+
{windows.WSAENOTSOCK, "ENOTSOCK"},
43+
{windows.WSAEMSGSIZE, "EMSGSIZE"},
44+
{windows.WSAENOTEMPTY, "ENOTEMPTY"},
45+
// EWOULDBLOCK is a second name for EAGAIN's class in rbgo.
46+
{windows.WSAEWOULDBLOCK, "EAGAIN"},
3847
}
3948
for _, c := range cases {
4049
if got := mapHostErrno(int64(c.eno)); got != errnoNumbers[c.want] {
@@ -44,7 +53,51 @@ func TestMapHostErrnoIsRbW32MapErrno(t *testing.T) {
4453
if got := mapHostErrno(0); got != 0 {
4554
t.Errorf("mapHostErrno(0) = %d, want 0", got)
4655
}
47-
if got := mapHostErrno(int64(windows.WSAECONNRESET)); got != int64(windows.WSAECONNRESET) {
48-
t.Errorf("a WSA code was changed to %d", got)
56+
// A WSA code absent from errmap is kept, as rb_w32_map_errno keeps it.
57+
if got := mapHostErrno(int64(windows.WSAEDISCON)); got != int64(windows.WSAEDISCON) {
58+
t.Errorf("WSAEDISCON was changed to %d", got)
59+
}
60+
}
61+
62+
// TestWSARowsWithoutAClass pins the errmap rows whose class rbgo has no number
63+
// for: mapHostErrno keeps their WSA code. Defining one of those names on
64+
// Windows moves it out of this list, and the test says which.
65+
func TestWSARowsWithoutAClass(t *testing.T) {
66+
want := map[string]bool{
67+
"EHOSTDOWN": true, "EPFNOSUPPORT": true, "EPROCLIM": true, "EREMOTE": true,
68+
"ESHUTDOWN": true, "ESOCKTNOSUPPORT": true, "ETOOMANYREFS": true, "EUSERS": true,
69+
}
70+
if len(wsaErrnos) != 43 {
71+
t.Errorf("wsaErrnos has %d rows; errmap has 43 Winsock rows", len(wsaErrnos))
72+
}
73+
for code, name := range wsaErrnos {
74+
got := mapHostErrno(int64(code))
75+
_, named := errnoNumberOf(name)
76+
switch {
77+
case want[name] && named:
78+
t.Errorf("%s now has a number; drop it from this list", name)
79+
case want[name] && got != int64(code):
80+
t.Errorf("%d (%s, no class) was changed to %d", code, name, got)
81+
case !want[name] && !named:
82+
t.Errorf("%s has no number on Windows; WSA code %d keeps its own", name, code)
83+
case !want[name] && got == int64(code):
84+
t.Errorf("%d (%s) was not mapped", code, name)
85+
}
86+
}
87+
}
88+
89+
// TestErrnoOfErrorMapsTheWin32Code: the mapping is applied where the number
90+
// is dug out, so every raiser sees MRI's class, not the raw code.
91+
func TestErrnoOfErrorMapsTheWin32Code(t *testing.T) {
92+
err := &os.PathError{Op: "open", Path: `C:\nope\x`, Err: windows.ERROR_PATH_NOT_FOUND}
93+
if got, ok := errnoOfError(err); !ok || got != errnoNumbers["ENOENT"] {
94+
t.Errorf("errnoOfError = %d, %v; want ENOENT (%d)", got, ok, errnoNumbers["ENOENT"])
95+
}
96+
dir := &os.PathError{Op: "remove", Path: `C:\d`, Err: windows.ERROR_DIR_NOT_EMPTY}
97+
if !errIsErrno(dir, "ENOTEMPTY") {
98+
t.Errorf("ERROR_DIR_NOT_EMPTY is not ENOTEMPTY")
99+
}
100+
if errIsErrno(dir, "ENOENT") {
101+
t.Errorf("ERROR_DIR_NOT_EMPTY is ENOENT")
49102
}
50103
}

‎internal/vm/errno_winsock_other.go‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)