-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: CreateFile fails on Windows/exFAT after CL 143578 #29214
Comments
Change https://golang.org/cl/154377 mentions this issue: |
@egonelbre thank you for creating this issue. Please try https://go-review.googlesource.com/c/go/+/154377 to see if it fixes your problem. I am not sure how to test my change - we need disk with FAT file system on it. Maybe we can attach disk with FAT to our builders. Alex |
Found #26953 with regards to |
Ok, seems that when you have PS: having temp dir as the root drive is definitely a rare occasion and can be worked around by the user. |
Yes. We can, probably, create FAT volumes and mount them before builder boots. And have whatever we want tested there. We could, probably, use similar strategy for #28547 too.
I am not surprised that some tests fail in that environment. But FAT file system does not provide many functions that we all expect. So I am not worried that some tests fail. I don't use FAT file system myself. If you think, there are some important failures there to fix, please, create new issues for them, and than we can decide what to do.
I think it is an obvious bug. I filled #29291 to track it. Alex |
Basic code for VHD manipulation:
As for the failures, they are expected:
So they behave on FAT as I would expect. Tests could skip those, but not sure whether it's important enough. (Detection using For me using FAT filesystem was partly an accident. |
Kindly paging @bradfitz @dmitshur for perhaps some ideas on attaching FAT filesystems to the builders as requested by @alexbrainman's #29214 (comment) |
What @egonelbre posted above looks good. Can a test just do that? Or t.Skip if permissions are lacking? If you want something more, please file a builder bug and cc @dmitshur. |
@bradfitz Not sure which part of it. For VHD setup you do need Administrator access. I suspect setting it up with PowerShell prior to launching tests, would be much easier to manage. But, it is possible to use Windows API for it (https://stackoverflow.com/questions/24396644/programmatically-mount-a-microsoft-virtual-hard-drive-vhd), but that still would require admin permissions for running them (and implementing the API). So you would additionally need https://stackoverflow.com/a/8196291 to check prior to invoking these. Otherwise people would start getting a UAC request every time they run Go tests. For checking what you can do with a drive, I would probably setup builder with it, rather than changing it in tests. Then re-run |
IIRC our builders run as Administrator. If they wanted to, they could create the FAT-on-RAMDISK as needed, running either Powershell or Windows APIs... whatever's easiest. |
I tried that, but it does not work on my computer. Apparently you need Hyper-V installed for that. And I cannot install Hyper-V, because it is incompatible with VirtualBox that I use. But if someone can try to stick these commands into $GOPATH/golang.org/x/build/env/windows/startup.ps1 and recreate our builders system with it, we could try and write some tests that use them. Alex |
On a fairly clean Windows system running
make.bat
withmaster
(944a9c7) fails when using exFAT filesystem for the temporary / work directory.I bisected the issue to f108158.
It seems
go/src/os/types_windows.go
Line 52 in 5dc144c
Sidenote
The system cannot find the batch label specified - fail
seems to be due to.bat
files not using windows line endings@alexbrainman
What version of Go are you using (
go version
)?go1.11.2 windows/amd64
for bootstrap.Windows 10 Pro, Version 1809 (OS Build 117763.194)
go.tip env
OutputBisect results
bisect good d154ef6
bisect bad f108158
The text was updated successfully, but these errors were encountered: