*: fix various test problems with go1.25 (#3946)

- disable dwz test if it fails because of dwarf5
- fix TestExamineMemoryCmd, which made unwarranted assumptions about memory
This commit is contained in:
Alessandro Arzilli
2025-03-13 18:57:11 +01:00
committed by GitHub
parent fc6a439f22
commit 486574cb65
12 changed files with 38 additions and 34 deletions

View File

@ -23,7 +23,7 @@ func mustHaveObjcopy(t *testing.T) {
func TestLoadingExternalDebugInfo(t *testing.T) {
mustHaveObjcopy(t)
fixture := protest.BuildFixture("locationsprog", 0)
fixture := protest.BuildFixture(t, "locationsprog", 0)
defer os.Remove(fixture.Path)
stripAndCopyDebugInfo(fixture, t)
p, err := native.Launch(append([]string{fixture.Path}, ""), "", 0, []string{filepath.Dir(fixture.Path)}, "", "", proc.OutputRedirect{}, proc.OutputRedirect{})
@ -36,7 +36,7 @@ func TestLoadingExternalDebugInfo(t *testing.T) {
func TestGnuDebuglink(t *testing.T) {
mustHaveObjcopy(t)
// build math.go and make a copy of the executable
fixture := protest.BuildFixture("math", 0)
fixture := protest.BuildFixture(t, "math", 0)
buf, err := os.ReadFile(fixture.Path)
assertNoError(err, t, "ReadFile")
debuglinkPath := fixture.Path + "-gnu_debuglink"