diff options
author | Russ Cox <rsc@golang.org> | 2014-10-03 16:42:18 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-03 16:42:18 -0400 |
commit | cce8dfa1747a97e315667bc3adc4a00edaba0972 (patch) | |
tree | 854961de798768e77edd66d024f8fd7527a63799 /misc | |
parent | 0a635319fc000e052bd3d6e2823b170d046e06f5 (diff) | |
download | go-cce8dfa1747a97e315667bc3adc4a00edaba0972.tar.gz |
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://codereview.appspot.com/152970043
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/test/issue7978.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/cgo/test/issue7978.go b/misc/cgo/test/issue7978.go index 39864476c..5feed07b9 100644 --- a/misc/cgo/test/issue7978.go +++ b/misc/cgo/test/issue7978.go @@ -29,6 +29,7 @@ static void issue7978c(uint32_t *sync) { import "C" import ( + "os" "runtime" "strings" "sync/atomic" @@ -81,6 +82,9 @@ func issue7978go() { } func test7978(t *testing.T) { + if os.Getenv("GOTRACEBACK") != "2" { + t.Fatalf("GOTRACEBACK must be 2") + } issue7978sync = 0 go issue7978go() // test in c code, before callback |