]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "runtime: fix lldb test after DWARF compression"
authorAustin Clements <austin@google.com>
Tue, 17 Jul 2018 15:38:35 +0000 (11:38 -0400)
committerAustin Clements <austin@google.com>
Tue, 17 Jul 2018 16:25:47 +0000 (16:25 +0000)
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 <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/runtime-lldb_test.go

index 3cc154667af88a91b98496f200304cd5f734859c..fe3a0eb90d8c334f006a041cfae5802bafb716f6 100644 (file)
@@ -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)
        }