internal/outcome/shim: move signal constants

The magic numbers hurt readability.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-30 00:46:23 +09:00
parent 3f9f331501
commit eeb9f98e5b
4 changed files with 33 additions and 17 deletions

View File

@@ -148,9 +148,9 @@ func TestShimEntrypoint(t *testing.T) {
// deferred
call("wKeepAlive", stub.ExpectArgs{}, nil, nil),
}, Tracks: []stub.Expect{{Calls: []stub.Call{
call("rcRead", stub.ExpectArgs{}, []byte{2}, nil),
call("rcRead", stub.ExpectArgs{}, []byte{shimMsgInvalid}, nil),
call("verbose", stub.ExpectArgs{[]any{"sa_sigaction got invalid siginfo"}}, nil, nil),
call("rcRead", stub.ExpectArgs{}, []byte{3}, nil),
call("rcRead", stub.ExpectArgs{}, []byte{shimMsgBadPID}, nil),
call("verbose", stub.ExpectArgs{[]any{"got SIGCONT from unexpected process"}}, nil, nil),
call("rcRead", stub.ExpectArgs{}, nil, nil), // stub terminates this goroutine
}}}}, nil},