From 57b5a71d7c897a2f3a21ba8b875bb9264faed326 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 17 Jul 2018 11:38:35 -0400 Subject: [PATCH] Revert "runtime: fix lldb test after DWARF compression" This reverts commit c99300229de4e69220790c71da14785dc52c3d68. 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/runtime/runtime-lldb_test.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/runtime/runtime-lldb_test.go b/src/runtime/runtime-lldb_test.go index 3cc154667a..fe3a0eb90d 100644 --- a/src/runtime/runtime-lldb_test.go +++ b/src/runtime/runtime-lldb_test.go @@ -10,7 +10,6 @@ import ( "os" "os/exec" "path/filepath" - "regexp" "runtime" "strings" "testing" @@ -83,12 +82,8 @@ target = debugger.CreateTargetWithFileAndArch("a.exe", None) if target: print "Created target" main_bp = target.BreakpointCreateByLocation("main.go", 10) - if main_bp.GetNumLocations() != 0: + if main_bp: 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()) if process: print "Process launched" @@ -103,7 +98,7 @@ if target: if state in [lldb.eStateUnloaded, lldb.eStateLaunching, lldb.eStateRunning]: continue else: - print "SKIP: Timeout launching" + print "Timeout launching" break if state == lldb.eStateStopped: for t in process.threads: @@ -179,9 +174,8 @@ func TestLldbPython(t *testing.T) { got, _ := cmd.CombinedOutput() if string(got) != expectedLldbOutput { - skipReason := regexp.MustCompile("SKIP: .*\n").Find(got) - if skipReason != nil { - t.Skip(string(skipReason)) + if strings.Contains(string(got), "Timeout launching") { + t.Skip("Timeout launching") } t.Fatalf("Unexpected lldb output:\n%s", got) }