wgengine/magicsock: improve test logging output

This fixes line numbers and reduces timestamp
precision to overwhelming the output.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
reviewable/pr748/r3
Josh Bleecher Snyder 4 years ago committed by Josh Bleecher Snyder
parent 41f6c78c53
commit 6e38d29485

@ -783,7 +783,8 @@ func testActiveDiscovery(t *testing.T, d *devices) {
start := time.Now()
logf := func(msg string, args ...interface{}) {
msg = fmt.Sprintf("%s: %s", time.Since(start), msg)
t.Helper()
msg = fmt.Sprintf("%s: %s", time.Since(start).Truncate(time.Microsecond), msg)
tlogf(msg, args...)
}

Loading…
Cancel
Save