Skip to content
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

path/filepath: TestToNorm fails on Windows #17504

Closed
tossp opened this issue Oct 18, 2016 · 8 comments
Closed

path/filepath: TestToNorm fails on Windows #17504

tossp opened this issue Oct 18, 2016 · 8 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@tossp
Copy link

tossp commented Oct 18, 2016

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.7.2 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\src\golang
set GORACE=
set GOROOT=D:\develop\go
set GOTOOLDIR=D:\develop\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\ts\AppData\Local\Temp\go-build219919142=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1

What did you do?

RUN src\all.bat

What did you see instead?

ok      path    0.037s
--- FAIL: TestToNorm (0.00s)
        path_windows_test.go:429: toNorm(\Users\ts\AppData\Local\Temp\testToNorm651380327\test\foo\bar) failed: The system cannot find the path specified. (wd=.)
        path_windows_test.go:429: toNorm(\Users\ts\AppData\Local\Temp\testToNorm651380327\.\test\foo\bar) failed: The system cannot find the path specified. (wd=.)
        path_windows_test.go:429: toNorm(\Users\ts\AppData\Local\Temp\testToNorm651380327\test\..\test\foo\bar) failed: The system cannot find the path specified. (wd=.)
        path_windows_test.go:429: toNorm(\Users\ts\AppData\Local\Temp\testToNorm651380327\TEST\FOO\BAR) failed: The system cannot find the path specified. (wd=.)
FAIL
FAIL    path/filepath   1.128s
ok      reflect 0.132s
ok      regexp  0.203s
ok      regexp/syntax   0.360s
--- FAIL: TestGdbBacktrace (0.50s)
        runtime-gdb_test.go:50: gdb version 7.10
        runtime-gdb_test.go:261: could not find '#0.*main\.eee' in backtrace
        runtime-gdb_test.go:262: gdb output:
                Excess command line arguments ignored. (main.eee ...)
                startup-with-shell: No such file or directory.
                D:\develop\go\src\runtime/off: No such file or directory.
                Argument required (expression to compute).
                No default breakpoint address now.
                No executable specified, use `target exec'.
                No stack.
                The program is not being run.
FAIL
FAIL    runtime 41.795s
@quentinmit
Copy link
Contributor

1.7.2 was not released because it contains bugs; can you please upgrade to 1.7.3 and test again? That said, I suspect these bugs are unrelated.

Where did you get the gdb version that you have installed? I suspect that GDB may just not support debugging Go binaries on Windows.

@alexbrainman Any idea about the path failure on Windows?

@quentinmit quentinmit added OS-Windows NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 20, 2016
@quentinmit quentinmit changed the title 1.7.2 after compilation is complete, standard case testing errors path: TestToNorm fails on Windows Oct 20, 2016
@quentinmit quentinmit added this to the Go1.8 milestone Oct 20, 2016
@hirochachacha
Copy link
Contributor

If the temporary directory and the current working directory have different drives, that could be occured.

@tossp Can you show us output of

package main

import (
    "fmt"
    "os"
)

func main() {
    fmt.Println(os.TempDir())
}

and the path where you ran all.bat?

@hirochachacha
Copy link
Contributor

(Also some tests like this rely on the asssumption that os.TempDir returns an absolute path begins with a drive letter. If the user change related environmental variables, some tests may break)

@alexbrainman
Copy link
Member

What @hirochachacha said. If my Go is installed on c:\go and I run all.bat from c:\go\src and my TMP=H:\tmp and TEMP=H:\tmp, I get same error.

@hirochachacha do you want to send a fix for this?
Thank you.

Alex

@alexbrainman alexbrainman changed the title path: TestToNorm fails on Windows path/filepath: TestToNorm fails on Windows Oct 21, 2016
@alexbrainman
Copy link
Member

TMP=H:\tmp

I also see this:

C:\Documents and Settings\brainman>dir h:\tmp
 Volume in drive H is Home
 Volume Serial Number is ABCD-1234

 Directory of h:\tmp

21/10/2016  05:39 PM    <DIR>          .
21/10/2016  05:39 PM    <DIR>          ..
21/10/2016  05:31 PM    <DIR>          go-tool-dist-524176015
21/10/2016  05:34 PM    <DIR>          testToNorm243344763
21/10/2016  05:28 PM    <DIR>          testToNorm801290891
21/10/2016  05:28 PM    <DIR>          testToNorm951644835
               0 File(s)              0 bytes
               6 Dir(s)  1,495,156,419,587,420,672 bytes free

C:\Documents and Settings\brainman>

after running all.bat. It looks like the test leaves some tmp directories behind.

Alex

@hirochachacha
Copy link
Contributor

@hirochachacha do you want to send a fix for this?

This fragile test was introduced by me... so, yes I want to fix this by myself.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/31544 mentions this issue.

@hirochachacha
Copy link
Contributor

@tossp I sent the CL, but please confirm your issue. Thanks.

@golang golang locked and limited conversation to collaborators Oct 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

5 participants