diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-11-22 17:14:25 -0500 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-11-25 16:43:27 +0000 |
commit | e16f64c0947dac656465fe9321af5a626a7a4107 (patch) | |
tree | 6c3351b454e04b123049c22812adcfde2bcf7ec4 /misc | |
parent | 476395cb3e97cf7d9c50d8fe57c2c7926f1cff48 (diff) | |
download | go-e16f64c0947dac656465fe9321af5a626a7a4107.tar.gz go-e16f64c0947dac656465fe9321af5a626a7a4107.zip |
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: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/testasan/main.go | 7 | ||||
-rw-r--r-- | misc/cgo/testsigfwd/main.go | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/misc/cgo/testasan/main.go b/misc/cgo/testasan/main.go index 1837c6cc81..bc77678c25 100644 --- a/misc/cgo/testasan/main.go +++ b/misc/cgo/testasan/main.go @@ -36,14 +36,21 @@ thread(void *p) import "C" import ( + "fmt" + "os" + "path/filepath" "time" ) func main() { + start := time.Now() + // ensure that we can function normally var v [][]byte for i := 0; i < 1000; i++ { time.Sleep(10 * time.Microsecond) 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)) } diff --git a/misc/cgo/testsigfwd/main.go b/misc/cgo/testsigfwd/main.go index 61bd0da88a..6d97050078 100644 --- a/misc/cgo/testsigfwd/main.go +++ b/misc/cgo/testsigfwd/main.go @@ -25,6 +25,7 @@ static void sigsegv() { static void segvhandler(int signum) { if (signum == SIGSEGV) { + fprintf(stdout, "ok\ttestsigfwd\n"); exit(0); // success } } |