all: raise timeout defaults
All checks were successful
Test / Create distribution (push) Successful in 1m47s
Test / Sandbox (push) Successful in 12m48s
Test / Sandbox (race detector) (push) Successful in 14m31s
Test / Hakurei (push) Successful in 15m26s
Test / Hakurei (race detector) (push) Successful in 16m51s
Test / ShareFS (push) Successful in 38s
Test / Flake checks (push) Successful in 1m21s

This avoids timing out on systems running very slowly.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-17 17:02:36 +09:00
parent bac583f89e
commit 420c721c7d
11 changed files with 17 additions and 15 deletions

View File

@@ -65,13 +65,13 @@ func TestProxyStartWaitCloseString(t *testing.T) {
}
const (
stubProxyTimeout = 5 * time.Second
stubProxyTimeout = 15 * time.Second
)
func testProxyFinaliseStartWaitCloseString(t *testing.T, useSandbox bool) {
{
oldWaitDelay := helper.WaitDelay
helper.WaitDelay = 16 * time.Second
helper.WaitDelay = 30 * time.Second
t.Cleanup(func() { helper.WaitDelay = oldWaitDelay })
}

View File

@@ -11,7 +11,7 @@ import (
"hakurei.app/internal/helper/proc"
)
var WaitDelay = 2 * time.Second
var WaitDelay = 5 * time.Second
const (
// HakureiHelper is set to 1 when args fd is enabled and 0 otherwise.

View File

@@ -56,7 +56,7 @@ const (
// this function tests an implementation of the helper.Helper interface
func testHelper(t *testing.T, createHelper func(ctx context.Context, setOutput func(stdoutP, stderrP *io.Writer), stat bool) helper.Helper) {
oldWaitDelay := helper.WaitDelay
helper.WaitDelay = 16 * time.Second
helper.WaitDelay = 30 * time.Second
t.Cleanup(func() { helper.WaitDelay = oldWaitDelay })
t.Run("start helper with status channel and wait", func(t *testing.T) {

View File

@@ -10,7 +10,7 @@ import (
"time"
)
var FulfillmentTimeout = 2 * time.Second
var FulfillmentTimeout = 15 * time.Second
func init() {
if testing.Testing() {

View File

@@ -1,3 +1,4 @@
// Package info holds metadata populated at link time.
package info
// FallbackVersion is returned when a version string was not set by the linker.

View File

@@ -147,7 +147,7 @@ func (sp *shimPrivate) destroy() {
const (
// shimPipeWireTimeout is the duration pipewire-pulse is allowed to run
// before its socket becomes available.
shimPipeWireTimeout = 5 * time.Second
shimPipeWireTimeout = 15 * time.Second
)
func shimEntrypoint(k syscallDispatcher) {

View File

@@ -514,7 +514,7 @@ var ErrNotDone = errors.New("did not receive a Core::Done event targeting previo
const (
// syncTimeout is the maximum duration [Core.Sync] is allowed to take before
// receiving [CoreDone] or failing.
syncTimeout = 10 * time.Second
syncTimeout = RoundtripTimeout + 15*time.Second
)
// Sync queues a [CoreSync] message for the PipeWire server and initiates a Roundtrip.

View File

@@ -701,14 +701,14 @@ func (ctx *Context) Roundtrip() (err error) {
}
const (
// roundtripTimeout is the maximum duration socket operations during
// RoundtripTimeout is the maximum duration socket operations during
// Context.roundtrip is allowed to block for.
roundtripTimeout = 5 * time.Second
RoundtripTimeout = 30 * time.Second
)
// roundtrip implements the Roundtrip method without checking proxyErrors.
func (ctx *Context) roundtrip() (err error) {
ctx.conn.MightBlock(roundtripTimeout)
ctx.conn.MightBlock(RoundtripTimeout)
if err = ctx.sendmsg(ctx.buf, ctx.pendingFiles...); err != nil {
return
}
@@ -742,7 +742,7 @@ func (ctx *Context) roundtrip() (err error) {
}()
var remaining []byte
ctx.conn.MightBlock(roundtripTimeout)
ctx.conn.MightBlock(RoundtripTimeout)
for {
remaining, err = ctx.consume(remaining)
if err == nil {

View File

@@ -717,7 +717,7 @@ type stubUnixConn struct {
}
func (conn *stubUnixConn) MightBlock(timeout time.Duration) {
if timeout != 5*time.Second {
if timeout != pipewire.RoundtripTimeout {
panic("unexpected timeout " + timeout.String())
}
if conn.current == 0 ||

View File

@@ -499,7 +499,7 @@ type stubPipeWireConn struct {
}
func (conn *stubPipeWireConn) MightBlock(timeout time.Duration) {
if timeout != 5*time.Second {
if timeout != pipewire.RoundtripTimeout {
panic("unexpected timeout " + timeout.String())
}
}

View File

@@ -29,7 +29,7 @@ const (
lddName = "ldd"
// lddTimeout is the maximum duration ldd(1) is allowed to ran for before it
// is terminated.
lddTimeout = 4 * time.Second
lddTimeout = 15 * time.Second
)
// Resolve runs ldd(1) in a strict sandbox and connects its stdout to a [Decoder].
@@ -96,7 +96,8 @@ func Resolve(
if err := z.Wait(); err != nil {
m := stderr.Bytes()
if bytes.Contains(m, []byte(msgStaticSuffix)) || bytes.Contains(m, []byte(msgStaticGlibc)) {
if bytes.Contains(m, []byte(msgStaticSuffix)) ||
bytes.Contains(m, []byte(msgStaticGlibc)) {
return nil, nil
}