1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:40:02 -07:00

Revert "runtime: fix lldb test after DWARF compression"

This reverts commit c99300229d.

The original CL skipped the lldb test if it couldn't read compressed
DWARF, but lldb can never read compressed DWARF, so this effectively
disabled this test unconditionally.

The previous commit disabled DWARF compression for this test, so the
test now works on its own merits again. This CL reverts the change to
skip the test so we don't simply mask lldb failures.

Updates #25925.

Change-Id: I3e1c787b658257b542c3c70807065dde9cfe05ee
Reviewed-on: https://go-review.googlesource.com/124386
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Austin Clements 2018-07-17 11:38:35 -04:00
parent ff5b54d24a
commit 57b5a71d7c

View File

@ -10,7 +10,6 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"regexp"
"runtime" "runtime"
"strings" "strings"
"testing" "testing"
@ -83,12 +82,8 @@ target = debugger.CreateTargetWithFileAndArch("a.exe", None)
if target: if target:
print "Created target" print "Created target"
main_bp = target.BreakpointCreateByLocation("main.go", 10) main_bp = target.BreakpointCreateByLocation("main.go", 10)
if main_bp.GetNumLocations() != 0: if main_bp:
print "Created breakpoint" print "Created breakpoint"
else:
# This happens if lldb can't read the program's DWARF. See https://golang.org/issue/25925.
print "SKIP: no matching locations for breakpoint"
exit(1)
process = target.LaunchSimple(None, None, os.getcwd()) process = target.LaunchSimple(None, None, os.getcwd())
if process: if process:
print "Process launched" print "Process launched"
@ -103,7 +98,7 @@ if target:
if state in [lldb.eStateUnloaded, lldb.eStateLaunching, lldb.eStateRunning]: if state in [lldb.eStateUnloaded, lldb.eStateLaunching, lldb.eStateRunning]:
continue continue
else: else:
print "SKIP: Timeout launching" print "Timeout launching"
break break
if state == lldb.eStateStopped: if state == lldb.eStateStopped:
for t in process.threads: for t in process.threads:
@ -179,9 +174,8 @@ func TestLldbPython(t *testing.T) {
got, _ := cmd.CombinedOutput() got, _ := cmd.CombinedOutput()
if string(got) != expectedLldbOutput { if string(got) != expectedLldbOutput {
skipReason := regexp.MustCompile("SKIP: .*\n").Find(got) if strings.Contains(string(got), "Timeout launching") {
if skipReason != nil { t.Skip("Timeout launching")
t.Skip(string(skipReason))
} }
t.Fatalf("Unexpected lldb output:\n%s", got) t.Fatalf("Unexpected lldb output:\n%s", got)
} }