-
Notifications
You must be signed in to change notification settings - Fork 18k
Syscall: TestScript/mod_cache_rw failed on window-amd64 #35813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What version of Windows was this on? It looks like for some reason it didn't parse the Looking at https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rd, perhaps some (all?) versions of Windows require the path to precede the switches? |
Hmm, but the examples in https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rd#BKMK_examples pass the switches first too. |
@alexbrainman, @zx2c4: any idea what's going on here? I'm sure I'm missing something pretty fundamental, but I don't know what. |
@erifan, it would be really helpful to know what version of Windows this is on. |
|
Seems like it might be easier to have a built-in |
Change https://golang.org/cl/208639 mentions this issue: |
This test is specifically for OS-provided |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
$ cd go\src
$ ./all.bat
What did you expect to see?
All tests pass
What did you see instead?
--- FAIL: TestScript (0.00s)
--- FAIL: TestScript/mod_cache_rw (1.81s)
script_test.go:193:
# Regression test for golang.org/issue/31481. (0.000s)
# golang.org/issue/31481: an explicit flag should make directories in the module
# cache writable in order to work around the historical inability of 'rm -rf' to
# forcibly remove files in unwritable directories. (1.051s)
# After adding an extraneous file, 'go mod verify' should fail. (0.207s)
# However, files within those directories should still be read-only to avoid
# accidental mutations. (0.001s)
# If all 'go' commands ran with the flag, the system's 'rm' binary
# should be able to remove the module cache if the '-rf' flags are set. (0.115s)
> [!windows] [exec:rm] exec rm -rf $GOPATH/pkg/mod
> [!windows] [!exec:rm] go clean -modcache
> [windows] [exec:rmdir] exec rmdir /s /q $GOPATH\pkg\mod
[stderr]
rmdir: failed to remove '/s': No such file or directory
rmdir: failed to remove '/q': No such file or directory
rmdir: failed to remove '$WORK\gopath\pkg\mod': Directory not empty
[exit status 1]
FAIL: testdata\script\mod_cache_rw.txt:22: unexpected command failure
FAIL
FAIL cmd/go 299.986s
This failure has been pointed out in #35033, but the issue ticket has been closed, so I reopened this one. I don't know if I need to add some extra settings to build and test Go on Windows.
The text was updated successfully, but these errors were encountered: