Skip to content

Commit

Permalink
proc: disabled TestUnsupportedArch on go1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
aarzilli committed Jul 3, 2016
1 parent 80336e5 commit da910cc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions proc/proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1847,15 +1847,15 @@ func TestIssue509(t *testing.T) {

func TestUnsupportedArch(t *testing.T) {
ver, _ := ParseVersionString(runtime.Version())
if ver.Major < 0 || !ver.AfterOrEqual(GoVersion{1, 6, -1, 0, 0}) {
if ver.Major < 0 || !ver.AfterOrEqual(GoVersion{1, 6, -1, 0, 0}) || ver.AfterOrEqual(GoVersion{1, 7, -1, 0, 0}) {
// cross compile (with -N?) works only on select versions of go
return
}

fixturesDir := protest.FindFixturesDir()
infile := filepath.Join(fixturesDir, "math.go")
outfile := filepath.Join(fixturesDir, "_math_debug_386")

cmd := exec.Command("go", "build", "-gcflags=-N -l", "-o", outfile, infile)
for _, v := range os.Environ() {
if !strings.HasPrefix(v, "GOARCH=") {
Expand All @@ -1868,7 +1868,7 @@ func TestUnsupportedArch(t *testing.T) {
t.Fatalf("go build failed: %v: %v", err, string(out))
}
defer os.Remove(outfile)

p, err := Launch([]string{outfile})
switch err {
case UnsupportedArchErr:
Expand Down
6 changes: 3 additions & 3 deletions proc/proc_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ func (dbp *Process) findExecutable(path string) (*pe.File, error) {

func openExecutablePath(path string) (*pe.File, error) {
f, err := os.OpenFile(path, 0, os.ModePerm)
if err != nil {
return nil, err
}
if err != nil {
return nil, err
}
return pe.NewFile(f)
}

Expand Down
6 changes: 3 additions & 3 deletions proc/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ type Stackframe struct {
// Address of the call instruction for the function above on the call stack.
Call Location
// Start address of the stack frame.
CFA int64
CFA int64
// Description of the stack frame.
FDE *frame.FrameDescriptionEntry
FDE *frame.FrameDescriptionEntry
// Return address for this stack frame (as read from the stack frame itself).
Ret uint64
Ret uint64
}

// Scope returns a new EvalScope using this frame.
Expand Down
2 changes: 1 addition & 1 deletion proc/threads.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func topframe(g *G, thread *Thread) (Stackframe, error) {
var frames []Stackframe
var err error

if g == nil {
if g == nil {
if thread.blocked() {
return Stackframe{}, ThreadBlockedError{}
}
Expand Down

0 comments on commit da910cc

Please sign in to comment.