Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _scripts/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ func testFlags() []string {
}
if NOTimeout {
testFlags = append(testFlags, "-timeout", "0")
} else if runtime.GOARCH == "riscv64" {
testFlags = append(testFlags, "-timeout", "20m")
}
if len(os.Getenv("TEAMCITY_VERSION")) > 0 {
testFlags = append(testFlags, "-json")
Expand Down
2 changes: 1 addition & 1 deletion _scripts/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export GOPATH
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
go version
if [ "$arch" != "ppc64le" ]; then
go install honnef.co/go/tools/cmd/staticcheck@2026.1 || true
go install honnef.co/go/tools/cmd/staticcheck@2026.2rc1 || true
fi

go install github.com/google/capslock/cmd/capslock@latest
Expand Down
8 changes: 7 additions & 1 deletion cmd/dlv/dlv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func TestGeneratedDoc(t *testing.T) {
checkAutogenDoc(t, "Documentation/cli/config.md", "_scripts/gen-cli-docs.go", generatedBuf.Bytes())

// Checks gen-usage-docs.go
if runtime.GOARCH != "ppc64le" && runtime.GOARCH != "riscv64" {
if runtime.GOARCH != "ppc64le" && runtime.GOARCH != "riscv64" && !(runtime.GOOS == "windows" && runtime.GOARCH == "arm64") {
tempDir := t.TempDir()
cmd := exec.Command("go", "run", "_scripts/gen-usage-docs.go", tempDir)
cmd.Dir = protest.ProjectRoot()
Expand Down Expand Up @@ -1822,6 +1822,12 @@ func TestStaticcheck(t *testing.T) {
}

func TestCapsLock(t *testing.T) {
// TODO: Remove this skip once capslock supports Go 1.27+
// capslock v0.3.2 uses golang.org/x/tools v0.43.0 which panics on Go 1.27 syntax.
// The test will run on older stable Go versions in CI.
if ver, ok := goversion.Parse(runtime.Version()); ok && ver.Major == 1 && ver.Minor >= 27 && ver.Rev < 0 {
t.Skip("capslock not compatible with Go 1.27 development/RC builds (golang.org/x/tools issue)")
}
_, err := exec.LookPath("capslock")
if err != nil {
t.Skip("capslock not installed")
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/go-delve/delve

go 1.25
go 1.25.0

require (
github.com/cilium/ebpf v0.11.0
Expand All @@ -16,7 +16,7 @@ require (
go.starlark.net v0.0.0-20231101134539-556fd59b42f6
go.yaml.in/yaml/v3 v3.0.4
golang.org/x/arch v0.11.0
golang.org/x/sys v0.26.0
golang.org/x/sys v0.46.0
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5 h1:TCDqnvbBsFapViksHcHySl/sW4+rTGNIAoJJesHRuMM=
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5/go.mod h1:8nZWdGp9pq73ZI//QJyckMQab3yq7hoWi7SI0UIusVI=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
Expand Down
24 changes: 14 additions & 10 deletions pkg/debugdetect/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package debugdetect

import (
"bufio"
"bytes"
"os/exec"
"path/filepath"
"runtime"
Expand All @@ -12,13 +13,16 @@ import (
"github.com/go-delve/delve/service/rpc2"
)

func parseListenAddr(t *testing.T, text string) string {
func scanForListenAddr(t *testing.T, scanner *bufio.Scanner, stderr *bytes.Buffer) string {
t.Helper()
const marker = " server listening at: "
if idx := strings.Index(text, marker); idx >= 0 {
return text[idx+len(marker):]
for scanner.Scan() {
line := scanner.Text()
if idx := strings.Index(line, marker); idx >= 0 {
return line[idx+len(marker):]
}
}
t.Fatalf("could not parse listen address from %q", text)
t.Fatalf("dlv exited without printing listen address (stderr: %s)", stderr.String())
return ""
}

Expand Down Expand Up @@ -60,6 +64,8 @@ func TestIntegration_WaitForDebugger(t *testing.T) {
fixtureSrc := filepath.Join(fixturesDir, "waitfordebugger.go")

cmd := exec.Command(dlvbin, "debug", fixtureSrc, "--headless", "--continue", "--accept-multiclient", "--listen", "127.0.0.1:0")
var stderr bytes.Buffer
cmd.Stderr = &stderr
stdout, err := cmd.StdoutPipe()
if err != nil {
t.Fatal(err)
Expand All @@ -70,10 +76,8 @@ func TestIntegration_WaitForDebugger(t *testing.T) {
t.Fatal(err)
}

// Read stdout to get listen address and program output
scanner := bufio.NewScanner(stdout)
scanner.Scan()
listenAddr := parseListenAddr(t, scanner.Text())
listenAddr := scanForListenAddr(t, scanner, &stderr)

foundOutput := false
for scanner.Scan() {
Expand Down Expand Up @@ -108,6 +112,8 @@ func TestIntegration_Attached(t *testing.T) {
// Run the fixture under dlv debug with --headless --continue
// This will attach the debugger, compile and run the program
cmd := exec.Command(dlvbin, "debug", fixtureSrc, "--headless", "--continue", "--accept-multiclient", "--listen", "127.0.0.1:0")
var stderr bytes.Buffer
cmd.Stderr = &stderr
stdout, err := cmd.StdoutPipe()
if err != nil {
t.Fatal(err)
Expand All @@ -118,10 +124,8 @@ func TestIntegration_Attached(t *testing.T) {
t.Fatal(err)
}

// Read stdout to get listen address and program output
scanner := bufio.NewScanner(stdout)
scanner.Scan()
listenAddr := parseListenAddr(t, scanner.Text())
listenAddr := scanForListenAddr(t, scanner, &stderr)

foundOutput := false
for scanner.Scan() {
Expand Down
15 changes: 11 additions & 4 deletions pkg/proc/proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1069,9 +1069,12 @@ func evalVariable(p *proc.Target, t testing.TB, symbol string) *proc.Variable {

func TestFrameEvaluation(t *testing.T) {
protest.AllowRecording(t)
lenient := false
leniency := 0
if runtime.GOOS == "windows" {
lenient = true
leniency = 1
if runtime.GOARCH == "arm64" {
leniency = 2
}
}
withTestProcess("goroutinestackprog", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
setFunctionBreakpoint(p, t, "main.stacktraceme")
Expand Down Expand Up @@ -1114,13 +1117,17 @@ func TestFrameEvaluation(t *testing.T) {
continue
}
vval, _ := constant.Int64Val(v.Value)
if vval < 0 || vval >= int64(len(found)) {
t.Logf("Goroutine %d: unexpected value of i: %d\n", g.ID, vval)
continue
}
found[vval] = true
}

for i := range found {
if !found[i] {
if lenient {
lenient = false
if leniency > 0 {
leniency--
} else {
t.Fatalf("Goroutine %d not found\n", i)
}
Expand Down
23 changes: 15 additions & 8 deletions pkg/proc/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2028,14 +2028,21 @@ func TestMapImplementationVariants(t *testing.T) {
}

if goversion.VersionAfterOrEqual(runtime.Version(), 1, 27) {
t.Run("MapSplitGroup", func(t *testing.T) {
t.Setenv("GOEXPERIMENT", "mapsplitgroup")
helper(t, testcases)
})
t.Run("NoMapSplitGroup", func(t *testing.T) {
t.Setenv("GOEXPERIMENT", "nomapsplitgroup")
helper(t, testcases)
})
// Non-default GOEXPERIMENT values force a full standard library
// rebuild which is too slow on riscv64 to complete within the
// test timeout.
if runtime.GOARCH == "riscv64" {
t.Log("skipping GOEXPERIMENT subtests on riscv64: stdlib rebuild too slow")
} else {
t.Run("MapSplitGroup", func(t *testing.T) {
t.Setenv("GOEXPERIMENT", "mapsplitgroup")
helper(t, testcases)
})
t.Run("NoMapSplitGroup", func(t *testing.T) {
t.Setenv("GOEXPERIMENT", "nomapsplitgroup")
helper(t, testcases)
})
}
}

if !goversion.VersionAfterOrEqual(runtime.Version(), 1, 26) {
Expand Down
135 changes: 119 additions & 16 deletions vendor/golang.org/x/sys/unix/affinity_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading