aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2025-08-03 22:49:35 +0200
committerJakob Unterwurzacher2025-08-03 22:49:35 +0200
commitdad4c9fc77f3c5c05396259ef0990c1b338344da (patch)
treebae7574ccd47207f8a847e329d2a8fade0658e76
parentac0b182ad49c5f32d59227e685cd5d4afc863633 (diff)
test_helpers: send SIGQUIT on mount timeout
-rw-r--r--tests/test_helpers/mount_unmount.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_helpers/mount_unmount.go b/tests/test_helpers/mount_unmount.go
index 4abc432..277c8d8 100644
--- a/tests/test_helpers/mount_unmount.go
+++ b/tests/test_helpers/mount_unmount.go
@@ -95,6 +95,11 @@ func Mount(c string, p string, showOutput bool, extraArgs ...string) error {
case <-chanUsr1:
// noop
case <-time.After(2 * time.Second):
+ fmt.Printf("Timeout, sending SIGQUIT and SIGKILL")
+ cmd.Process.Signal(syscall.SIGQUIT)
+ // SIGQUIT should trigger a backtrace. Give it some time to print it.
+ time.Sleep(time.Second)
+ cmd.Process.Kill()
log.Panicf("Timeout waiting for process %d", pid)
}