testing: explain how SkipNow and FailNow stop execution
testing: explain how SkipNow and FailNow stop execution

SkipNow and FailNow must be called from the goroutine running the
test. This is already documented, but it's easy to call them by
mistake when writing subtests. In the following:

  func TestPanic(t *testing.T) {
    t.Run("", func(t2 *testing.T) {
	  t.FailNow()    // BAD: should be t2.FailNow()
	})
  }

the FailNow call on the outer t *testing.T correctly triggers a panic

  panic: test executed panic(nil) or runtime.Goexit

The error message confuses users (see issues #17421, #21175) because
there is no way to trace back the relevant part of the message ("test
executed ... runtime.Goexit") to a bad FailNow call without checking
the testing package source code and finding out that FailNow calls
runtime.Goexit.

To help users debug the panic message, mention in the SkipNow and
FailNow documentation that they stop execution by calling
runtime.Goexit.

Fixes #21175

Change-Id: I0a3e5f768e72b464474380cfffbf2b67396ac1b5
Reviewed-on: https://go-review.googlesource.com/52770
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

akutz/go,akutz/go,Cofyc/go,polyverse-security/go,codestation/go,josharian/go,cloudflare/go,codestation/go,josharian/go,nawawi/go,CAFxX/go,josharian/go,codestation/go,nawawi/go,CAFxX/go,CAFxX/go,polyverse-security/go,CAFxX/go,akutz/go,Cofyc/go,akutz/go,codestation/go,CAFxX/go,nawawi/go,golang/go,cloudflare/go,nawawi/go,Cofyc/go,christopher-henderson/Go,polyverse-security/go,cloudflare/go,cloudflare/go,akutz/go,josharian/go,cloudflare/go,polyverse-security/go,nawawi/go,akutz/go,codestation/go,josharian/go,Cofyc/go,polyverse-security/go,polyverse-security/go,nawawi/go,CAFxX/go,golang/go,cloudflare/go,josharian/go,polyverse-security/go,Cofyc/go,josharian/go,cloudflare/go,codestation/go,golang/go,Cofyc/go,polyverse-security/go,CAFxX/go,Cofyc/go,golang/go,nawawi/go,golang/go,codestation/go,CAFxX/go,cloudflare/go,codestation/go,nawawi/go,golang/go,Cofyc/go,golang/go,akutz/go,akutz/go,josharian/go,golang/go