tailscale/ipn
Avery Pennarun 08acb502e5 Add tstest.PanicOnLog(), and fix various problems detected by this.
If a test calls log.Printf, 'go test' horrifyingly rearranges the
output to no longer be in chronological order, which makes debugging
virtually impossible. Let's stop that from happening by making
log.Printf panic if called from any module, no matter how deep, during
tests.

This required us to change the default error handler in at least one
http.Server, as well as plumbing a bunch of logf functions around,
especially in magicsock and wgengine, but also in logtail and backoff.

To add insult to injury, 'go test' also rearranges the output when a
parent test has multiple sub-tests (all the sub-test's t.Logf is always
printed after all the parent tests t.Logf), so we need to screw around
with a special Logf that can point at the "current" t (current_t.Logf)
in some places. Probably our entire way of using subtests is wrong,
since 'go test' would probably like to run them all in parallel if you
called t.Parallel(), but it definitely can't because the're all
manipulating the shared state created by the parent test. They should
probably all be separate toplevel tests instead, with common
setup/teardown logic. But that's a job for another time.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2020-05-13 23:12:35 -04:00
..
ipnserver Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
ipnstate ipn/ipnstate: improve HTML output 2020-05-08 14:29:42 -07:00
policy ipn, ipn/policy: filter portlist to a short list of "interesting" ports 2020-04-01 10:03:44 -07:00
backend.go ipn, wgengine/filter: remove exported type aliases 2020-05-11 07:19:17 -07:00
doc.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
e2e_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
fake_test.go ipn, wgengine/filter: remove exported type aliases 2020-05-11 07:19:17 -07:00
handle.go ipn, wgengine/filter: remove exported type aliases 2020-05-11 07:19:17 -07:00
local.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
message.go ipn: add AllowVersionSkew bool to Notify & Message 2020-05-09 13:51:48 -07:00
message_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
prefs.go wgengine/router: add a setting to disable SNAT for subnet routes. 2020-05-11 20:17:13 +00:00
prefs_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
store.go ipn: have NewFileStore try to create directories as needed 2020-03-03 11:51:44 -08:00
store_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00