You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/tstest
Brad Fitzpatrick 055fdb235f cmd/tailscaled, tstest/integration: make tailscaled die when parent dies
I noticed that failed tests were leaving aroudn stray tailscaled processes
on macOS at least.

To repro, add this to tstest/integration:

    func TestFailInFewSeconds(t *testing.T) {
        t.Parallel()
        time.Sleep(3 * time.Second)
        os.Exit(1)
        t.Fatal("boom")
    }

Those three seconds let the other parallel tests (with all their
tailscaled child processes) start up and start running their tests,
but then we violently os.Exit(1) the test driver and all the children
were kept alive (and were spinning away, using all available CPU in
gvisor scheduler code, which is a separate scary issue)

Updates #cleanup

Change-Id: I9c891ed1a1ec639fb2afec2808c04dbb8a460e0e
Co-authored-by: Maisem Ali <maisem@tailscale.com>
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2 years ago
..
archtest all: update copyright and license headers 3 years ago
deptest util/testenv: add new package to hold InTest 2 years ago
integration cmd/tailscaled, tstest/integration: make tailscaled die when parent dies 2 years ago
iosdeps all: replace deprecated ioutil references 2 years ago
jsdeps tstest/deptest: add test-only package to unify negative dep tests 2 years ago
natlab wgengine/magicsock, types/nettype, etc: finish ReadFromUDPAddrPort netip migration 3 years ago
tools all: update copyright and license headers 3 years ago
allocs.go all: update copyright and license headers 3 years ago
clock.go tstime: add Since method (#8622) 2 years ago
clock_test.go all: use Go 1.21 slices, maps instead of x/exp/{slices,maps} 2 years ago
log.go control/controlclient: remove unused StartLogout 2 years ago
log_test.go all: update copyright and license headers 3 years ago
resource.go all: update copyright and license headers 3 years ago
tstest.go all: use tstest.Replace more 3 years ago
tstest_test.go tstest: add method to Replace values for tests 3 years ago