cmd/go: fix reporting of test cycles to have proper order
and begin and end with the same package to demonstrate the cyclical
nature of the stack. Also fix the list_test_cycle script test
which was testing for the wrong behavior.
Fixes #59970
Change-Id: I3b3ee6762ee121fec19688ff1823cdfddae94f53
Reviewed-on: https://go-review.googlesource.com/c/go/+/498115 Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>