forked from security/hakurei
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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user