mirror of
https://github.com/golang/go.git
synced 2025-05-17 05:14:40 +00:00
cmd/link/internal/ld: temporarily add skip for new portion of TestElfBindNow
Skip newly added sections in TestElfBindNow from elf_test.go temporarily pending resolution of failures on loong64 and ppc64le. Change-Id: I22e0e52c9fbbcad88a4d0088f631ed7be15bf9da Reviewed-on: https://go-review.googlesource.com/c/go/+/580776 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
734fd7a949
commit
ed2671aa15
@ -339,50 +339,54 @@ func TestElfBindNow(t *testing.T) {
|
|||||||
t.Fatalf("DT_FLAGS_1 DF_1_PIE got: %v, want: %v", gotDf1Pie, test.wantDf1Pie)
|
t.Fatalf("DT_FLAGS_1 DF_1_PIE got: %v, want: %v", gotDf1Pie, test.wantDf1Pie)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, wsroname := range test.wantSecsRO {
|
// Skipping this newer portion of the test temporarily pending resolution of problems on ppc64le, loonpg64, possibly others.
|
||||||
// Locate section of interest.
|
if false {
|
||||||
var wsro *elf.Section
|
|
||||||
for _, s := range elfFile.Sections {
|
|
||||||
if s.Name == wsroname {
|
|
||||||
wsro = s
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if wsro == nil {
|
|
||||||
t.Fatalf("test %s: can't locate %q section",
|
|
||||||
test.name, wsroname)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now walk the program headers. Section should be part of
|
for _, wsroname := range test.wantSecsRO {
|
||||||
// some segment that is readonly.
|
// Locate section of interest.
|
||||||
foundRO := false
|
var wsro *elf.Section
|
||||||
foundSegs := []*elf.Prog{}
|
for _, s := range elfFile.Sections {
|
||||||
for _, p := range elfFile.Progs {
|
if s.Name == wsroname {
|
||||||
if segContainsSec(p, wsro) {
|
wsro = s
|
||||||
foundSegs = append(foundSegs, p)
|
break
|
||||||
if p.Flags == elf.PF_R {
|
|
||||||
foundRO = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if wsro == nil {
|
||||||
if !foundRO {
|
t.Fatalf("test %s: can't locate %q section",
|
||||||
// Things went off the rails. Write out some
|
test.name, wsroname)
|
||||||
// useful information for a human looking at the
|
|
||||||
// test failure.
|
|
||||||
t.Logf("test %s: %q section not in readonly segment",
|
|
||||||
wsro.Name, test.name)
|
|
||||||
t.Logf("section %s location: st=0x%x en=0x%x\n",
|
|
||||||
wsro.Name, wsro.Addr, wsro.Addr+wsro.FileSize)
|
|
||||||
t.Logf("sec %s found in these segments: ", wsro.Name)
|
|
||||||
for _, p := range foundSegs {
|
|
||||||
t.Logf(" %q", p.Type)
|
|
||||||
}
|
}
|
||||||
t.Logf("\nall segments: \n")
|
|
||||||
for k, p := range elfFile.Progs {
|
// Now walk the program headers. Section should be part of
|
||||||
t.Logf("%d t=%s fl=%s st=0x%x en=0x%x\n",
|
// some segment that is readonly.
|
||||||
k, p.Type, p.Flags, p.Vaddr, p.Vaddr+p.Filesz)
|
foundRO := false
|
||||||
|
foundSegs := []*elf.Prog{}
|
||||||
|
for _, p := range elfFile.Progs {
|
||||||
|
if segContainsSec(p, wsro) {
|
||||||
|
foundSegs = append(foundSegs, p)
|
||||||
|
if p.Flags == elf.PF_R {
|
||||||
|
foundRO = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !foundRO {
|
||||||
|
// Things went off the rails. Write out some
|
||||||
|
// useful information for a human looking at the
|
||||||
|
// test failure.
|
||||||
|
t.Logf("test %s: %q section not in readonly segment",
|
||||||
|
wsro.Name, test.name)
|
||||||
|
t.Logf("section %s location: st=0x%x en=0x%x\n",
|
||||||
|
wsro.Name, wsro.Addr, wsro.Addr+wsro.FileSize)
|
||||||
|
t.Logf("sec %s found in these segments: ", wsro.Name)
|
||||||
|
for _, p := range foundSegs {
|
||||||
|
t.Logf(" %q", p.Type)
|
||||||
|
}
|
||||||
|
t.Logf("\nall segments: \n")
|
||||||
|
for k, p := range elfFile.Progs {
|
||||||
|
t.Logf("%d t=%s fl=%s st=0x%x en=0x%x\n",
|
||||||
|
k, p.Type, p.Flags, p.Vaddr, p.Vaddr+p.Filesz)
|
||||||
|
}
|
||||||
|
t.Fatalf("test %s failed", test.name)
|
||||||
}
|
}
|
||||||
t.Fatalf("test %s failed", test.name)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user