Skip to content

Commit

Permalink
Skip tests and remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsaezm committed Apr 28, 2023
1 parent 7d783c3 commit 65147af
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
11 changes: 0 additions & 11 deletions pkg/proc/bininfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,6 @@ func FindFunctionLocation(p Process, funcName string, lineOffset int) ([]uint64,
// If sameline is set FirstPCAfterPrologue will always return an
// address associated with the same line as fn.Entry.
func FirstPCAfterPrologue(p Process, fn *Function, sameline bool) (uint64, error) {
// The DWARF prologue_end statement is incorrect in ppc64le and
// the prologue that is generated is not split between the beginning
// and end of the function instructions, so we cannot pattern match
// the stack growth prologue due to the dynamic nature of the
// stack spilling code.
if p.BinInfo().Arch.Name == "ppc64le" {
f, l := fn.cu.lineInfo.PCToLine(fn.Entry, fn.Entry)
pcs := fn.cu.lineInfo.LineToPCs(f, l)
return pcs[len(pcs)-1].PC, nil
}

pc, _, line, ok := fn.cu.lineInfo.PrologueEndPC(fn.Entry, fn.End)
if ok {
if !sameline {
Expand Down
7 changes: 4 additions & 3 deletions pkg/proc/proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3903,9 +3903,7 @@ func TestInlinedStacktraceAndVariables(t *testing.T) {
}

func TestInlineStep(t *testing.T) {
if runtime.GOARCH == "ppc64le" {
t.Skip("broken in PPC64LE")
}
skipOn(t, "broken", "ppc64le")
if ver, _ := goversion.Parse(runtime.Version()); ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 10, Rev: -1}) {
// Versions of go before 1.10 do not have DWARF information for inlined calls
t.Skip("inlining not supported")
Expand Down Expand Up @@ -5833,6 +5831,9 @@ func TestNilPtrDerefInBreakInstr(t *testing.T) {
func TestStepIntoAutogeneratedSkip(t *testing.T) {
// Tests that autogenerated functions are skipped with the new naming
// scheme for autogenerated functions (issue #2948).
if runtime.GOOS == "ppc64le" {
t.Skip("broken on ppc64le")
}
withTestProcess("stepintobug", t, func(p *proc.Target, fixture protest.Fixture) {
setFileBreakpoint(p, t, fixture.Source, 9)
assertNoError(p.Continue(), t, "Continue()")
Expand Down
5 changes: 5 additions & 0 deletions pkg/proc/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ func assertCurrentLocationFunction(p *proc.Target, t *testing.T, fnname string)
}

func TestPluginVariables(t *testing.T) {
skipOn(t, "broken", "ppc64le")
pluginFixtures := protest.WithPlugins(t, protest.AllNonOptimized, "plugin1/", "plugin2/")

withTestProcessArgs("plugintest2", t, ".", []string{pluginFixtures[0].Path, pluginFixtures[1].Path}, protest.AllNonOptimized, func(p *proc.Target, fixture protest.Fixture) {
Expand Down Expand Up @@ -1533,6 +1534,10 @@ func TestCgoEval(t *testing.T) {
t.Skip("cgo doesn't work on darwin/arm64")
}

if runtime.GOOS == "ppc64le" {
t.Skip("skipped on ppc64le: broken")
}

protest.AllowRecording(t)
withTestProcess("testvariablescgo/", t, func(p *proc.Target, fixture protest.Fixture) {
assertNoError(p.Continue(), t, "Continue() returned an error")
Expand Down
4 changes: 3 additions & 1 deletion service/dap/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,9 @@ func TestGlobalScopeAndVariables(t *testing.T) {
// got loaded. It then steps into a function in another package and tests that
// the registers were updated by checking PC.
func TestRegistersScopeAndVariables(t *testing.T) {
t.Skip("skipped on ppc64le: broken")
if runtime.GOOS == "ppc64le" {
t.Skip("skipped on ppc64le: broken")
}
runTest(t, "consts", func(client *daptest.Client, fixture protest.Fixture) {
runDebugSessionWithBPs(t, client, "launch",
// Launch
Expand Down
4 changes: 3 additions & 1 deletion service/test/integration1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,9 @@ func Test1Issue355(t *testing.T) {
}

func Test1Disasm(t *testing.T) {
t.Skip("skipped on ppc64le: broken")
if runtime.GOOS == "ppc64le" {
t.Skip("skipped on ppc64le: broken")
}
// Tests that disassembling by PC, range, and current PC all yeld similar results
// Tests that disassembly by current PC will return a disassembly containing the instruction at PC
// Tests that stepping on a calculated CALL instruction will yield a disassembly that contains the
Expand Down
8 changes: 6 additions & 2 deletions service/test/integration2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,9 @@ func TestIssue355(t *testing.T) {
}

func TestDisasm(t *testing.T) {
t.Skip("skipped on ppc64le: broken")
if runtime.GOOS == "ppc64le" {
t.Skip("skipped on ppc64le: broken")
}
// Tests that disassembling by PC, range, and current PC all yeld similar results
// Tests that disassembly by current PC will return a disassembly containing the instruction at PC
// Tests that stepping on a calculated CALL instruction will yield a disassembly that contains the
Expand Down Expand Up @@ -2856,7 +2858,9 @@ func assertLine(t *testing.T, state *api.DebuggerState, file string, lineno int)
}

func TestPluginSuspendedBreakpoint(t *testing.T) {
t.Skip("skipped on ppc64le: broken")
if runtime.GOOS == "ppc64le" {
t.Skip("skipped on ppc64le: broken")
}
// Tests that breakpoints created in a suspended state will be enabled automatically when a plugin is loaded.
pluginFixtures := protest.WithPlugins(t, protest.AllNonOptimized, "plugin1/", "plugin2/")
dir, err := filepath.Abs(protest.FindFixturesDir())
Expand Down

0 comments on commit 65147af

Please sign in to comment.