go: path/filepath: TestIssue29372 fails on windows-arm builder

Since 44cf595a7efcd3d7048c745d1d1531696bcb5941 windows-arm builder fails with

https://build.golang.org/log/c00262fb40118e6917815b61ce7e1643b702bdc3

--- FAIL: TestIssue29372 (0.02s)
    path_test.go:1398: test#0: want "The system cannot find the path specified.", got %!q(<nil>)
FAIL
FAIL	path/filepath	26.728s

I don’t see how TestIssue29372 can fail this way. @jordanrh1 please help to debug this.

We can skip the test on windows-arm, but I would like to understand what is wrong here first.

Thank you.

Alex

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

It is worth noting that none of this is ARM-specific. It is showing up on the ARM builder because %tmp% is a path that contains a volume mount point.

  • On ARM, the temporary file gets created at C:\Data\Users\administrator\AppData\Local\Temp\issue29372940456735.
  • C:\Data is actually a volume mount point.
  • When walkSymlinks() tests to see if C:\Data is a symlink, it finds that it is, and Readlink returns Volume{ae420040-0000-0000-0000-008200000000}.
  • walkSymlinks then tries to Lstat this path, but Lstat fails because the path name is missing the required \\?\ prefix. The path must look like \\?\Volume{ae420040-0000-0000-0000-008200000000}.
  • walkSymlinks then returns an error, which causes evalSymlinks to call evalSymlinksUsingGetFinalPathNameByHandle, which succeeds.
  • Since the test is expecting EvalSymlinks to fail with ENOTDIR, but EvalSymlinks succeeded, the test fails.

I’m looking into Readlink to see if the returned value should be prefixed with \\?\.