Skip to content

Commit abd697b

Browse files
committed
Fix test
1 parent a86d258 commit abd697b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/ebpf/uprobes/attacher_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,15 +1095,15 @@ func (s *SharedLibrarySuite) TestMultipleLibsets() {
10951095
}
10961096
},
10971097
3, 10*time.Millisecond, 500*time.Millisecond, "did not catch %s process, received calls %v", tc.description, mockRegistry.Calls)
1098+
1099+
require.NotNil(t, cmd)
1100+
require.NotNil(t, cmd.Process)
10981101
commands = append(commands, cmd)
10991102
}
11001103

11011104
for i, cmd := range commands {
11021105
mockRegistry.AssertCalled(t, "Register", testCases[i].libPath, uint32(cmd.Process.Pid), mock.Anything, mock.Anything, mock.Anything)
1103-
1104-
if cmd != nil && cmd.Process != nil {
1105-
cmd.Process.Kill()
1106-
}
1106+
cmd.Process.Kill()
11071107
}
11081108

11091109
// Verify unregister calls for all processes

0 commit comments

Comments
 (0)