Commit 46302185 authored by Russ Cox's avatar Russ Cox

misc/cgo/test: fail issue 7978 with clearer error when GOTRACEBACK != 2

The test doesn't work with GOTRACEBACK != 2.
Diagnose that failure mode.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/152970043
parent a2242456
...@@ -29,6 +29,7 @@ static void issue7978c(uint32_t *sync) { ...@@ -29,6 +29,7 @@ static void issue7978c(uint32_t *sync) {
import "C" import "C"
import ( import (
"os"
"runtime" "runtime"
"strings" "strings"
"sync/atomic" "sync/atomic"
...@@ -81,6 +82,9 @@ func issue7978go() { ...@@ -81,6 +82,9 @@ func issue7978go() {
} }
func test7978(t *testing.T) { func test7978(t *testing.T) {
if os.Getenv("GOTRACEBACK") != "2" {
t.Fatalf("GOTRACEBACK must be 2")
}
issue7978sync = 0 issue7978sync = 0
go issue7978go() go issue7978go()
// test in c code, before callback // test in c code, before callback
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment