Commit e16f64c0 authored by Bryan C. Mills's avatar Bryan C. Mills

misc: log 'ok' from 'go run' tests on success

Otherwise, these tests produce no output, which can make the overall
output of all.bash a bit tricky to decipher.

Updates #30316
Updates #29062

Change-Id: I33b9e070fd28b9f21ece128e9e603a982c08b7cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/208483
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
parent 476395cb
...@@ -36,14 +36,21 @@ thread(void *p) ...@@ -36,14 +36,21 @@ thread(void *p)
import "C" import "C"
import ( import (
"fmt"
"os"
"path/filepath"
"time" "time"
) )
func main() { func main() {
start := time.Now()
// ensure that we can function normally // ensure that we can function normally
var v [][]byte var v [][]byte
for i := 0; i < 1000; i++ { for i := 0; i < 1000; i++ {
time.Sleep(10 * time.Microsecond) time.Sleep(10 * time.Microsecond)
v = append(v, make([]byte, 64<<10)) v = append(v, make([]byte, 64<<10))
} }
fmt.Printf("ok\t%s\t%s\n", filepath.Base(os.Args[0]), time.Since(start).Round(time.Millisecond))
} }
...@@ -25,6 +25,7 @@ static void sigsegv() { ...@@ -25,6 +25,7 @@ static void sigsegv() {
static void segvhandler(int signum) { static void segvhandler(int signum) {
if (signum == SIGSEGV) { if (signum == SIGSEGV) {
fprintf(stdout, "ok\ttestsigfwd\n");
exit(0); // success exit(0); // success
} }
} }
......
...@@ -692,7 +692,7 @@ func (t *tester) registerTests() { ...@@ -692,7 +692,7 @@ func (t *tester) registerTests() {
t.registerTest("testplugin", "../misc/cgo/testplugin", t.goTest(), t.timeout(600), ".") t.registerTest("testplugin", "../misc/cgo/testplugin", t.goTest(), t.timeout(600), ".")
} }
if gohostos == "linux" && goarch == "amd64" { if gohostos == "linux" && goarch == "amd64" {
t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", "main.go") t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", ".")
} }
if mSanSupported(goos, goarch) { if mSanSupported(goos, goarch) {
t.registerHostTest("testsanitizers/msan", "../misc/cgo/testsanitizers", "misc/cgo/testsanitizers", ".") t.registerHostTest("testsanitizers/msan", "../misc/cgo/testsanitizers", "misc/cgo/testsanitizers", ".")
...@@ -701,7 +701,7 @@ func (t *tester) registerTests() { ...@@ -701,7 +701,7 @@ func (t *tester) registerTests() {
t.registerHostTest("cgo_errors", "../misc/cgo/errors", "misc/cgo/errors", ".") t.registerHostTest("cgo_errors", "../misc/cgo/errors", "misc/cgo/errors", ".")
} }
if gohostos == "linux" && t.extLink() { if gohostos == "linux" && t.extLink() {
t.registerTest("testsigfwd", "../misc/cgo/testsigfwd", "go", "run", "main.go") t.registerTest("testsigfwd", "../misc/cgo/testsigfwd", "go", "run", ".")
} }
} }
......
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