From 3920acf8c215a30bc3b48408cf46a3951ec04555 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 4 Sep 2025 19:39:12 +0900 Subject: container/stub: remove function call in handleExit This gets inlined and does not cause problems usually but turns out -coverpkg uninlines it and breaks the recovery. Signed-off-by: Ophestra --- container/dispatcher_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'container/dispatcher_test.go') diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go index a4fa3c4b..3a806ce3 100644 --- a/container/dispatcher_test.go +++ b/container/dispatcher_test.go @@ -149,7 +149,7 @@ func checkSimple(t *testing.T, fname string, testCases []simpleTestCase) { t.Helper() k := &kstub{stub.New(t, func(s *stub.Stub[syscallDispatcher]) syscallDispatcher { return &kstub{s} }, tc.want)} - defer k.HandleExit() + defer stub.HandleExit(t) if err := tc.f(k); !reflect.DeepEqual(err, tc.wantErr) { t.Errorf("%s: error = %v, want %v", fname, err, tc.wantErr) } @@ -189,7 +189,7 @@ func checkOpBehaviour(t *testing.T, testCases []opBehaviourTestCase) { func(s *stub.Stub[syscallDispatcher]) syscallDispatcher { return &kstub{s} }, stub.Expect{Calls: slices.Concat(tc.early, []stub.Call{{Name: stub.CallSeparator}}, tc.apply)}, )} - defer k.HandleExit() + defer stub.HandleExit(t) errEarly := tc.op.early(state, k) k.Expects(stub.CallSeparator) if !reflect.DeepEqual(errEarly, tc.wantErrEarly) { -- cgit v1.3.1