*: 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

@ -130,7 +130,7 @@ func assertNoError(err error, t testing.TB, s string) {
func TestDwarfVersion(t *testing.T) {
// Tests that we correctly read the version of compilation units
fixture := protest.BuildFixture("math", 0)
fixture := protest.BuildFixture(t, "math", 0)
bi := NewBinaryInfo(runtime.GOOS, runtime.GOARCH)
// Use a fake entry point so LoadBinaryInfo does not error in case the binary is PIE.
const fakeEntryPoint = 1
@ -147,7 +147,7 @@ func TestRegabiFlagSentinel(t *testing.T) {
if !protest.RegabiSupported() {
t.Skip("irrelevant before Go 1.17 or on non-amd64 architectures")
}
fixture := protest.BuildFixture("math", 0)
fixture := protest.BuildFixture(t, "math", 0)
bi := NewBinaryInfo(runtime.GOOS, runtime.GOARCH)
// Use a fake entry point so LoadBinaryInfo does not error in case the binary is PIE.
const fakeEntryPoint = 1