mirror of https://github.com/golang/go.git
runtime/debug: stack test fail when GOROOT='/usr/local/go/'
Fixes: #65506 Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
parent
117164f9e3
commit
a616066dbf
|
|
@ -105,7 +105,12 @@ func TestStack(t *testing.T) {
|
||||||
}
|
}
|
||||||
filePrefix := ""
|
filePrefix := ""
|
||||||
if fileGoroot != "" {
|
if fileGoroot != "" {
|
||||||
filePrefix = filepath.ToSlash(fileGoroot) + "/src/"
|
fileGoroot = filepath.ToSlash(filepath.Clean(fileGoroot))
|
||||||
|
if fileGoroot == "/" {
|
||||||
|
filePrefix = "/src/"
|
||||||
|
} else {
|
||||||
|
filePrefix = fileGoroot + "/src/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
n := 0
|
n := 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue