diff --git a/pkg/event_processor/processor_test.go b/pkg/event_processor/processor_test.go index 8b0b92a46..5380f4b41 100644 --- a/pkg/event_processor/processor_test.go +++ b/pkg/event_processor/processor_test.go @@ -44,13 +44,15 @@ func TestEventProcessor_Serve(t *testing.T) { var err error err = ep.Serve() if err != nil { - log.Fatalf(err.Error()) + //log.Fatalf(err.Error()) + t.Error(err) + return } }() content, err := os.ReadFile(testFile) if err != nil { //Do something - log.Fatalf("open file error: %s, file:%s", err.Error(), testFile) + t.Fatalf("open file error: %s, file:%s", err.Error(), testFile) } lines := strings.Split(string(content), "\n") diff --git a/user/module/probe_openssl_lib.go b/user/module/probe_openssl_lib.go index 564833300..9b40cc9b8 100644 --- a/user/module/probe_openssl_lib.go +++ b/user/module/probe_openssl_lib.go @@ -212,8 +212,8 @@ func (m *MOpenSSLProbe) detectOpenssl(soPath string) error { } - f.Close() - buf = buf[:0] + _ = f.Close() + //buf = buf[:0] var bpfFile string var found bool