diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-04 19:39:12 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-04 19:39:12 +0900 |
| commit | 3920acf8c215a30bc3b48408cf46a3951ec04555 (patch) | |
| tree | 82ac0cb4af518165114ee17b6c7796999ac40136 /container/dispatcher_test.go | |
| parent | 19630a95932451b4df3f6fd70e88aef9303235e9 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher_test.go')
| -rw-r--r-- | container/dispatcher_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |
