Skip to content

Commit

Permalink
[CWS] no trace_pipe with ebpfless (#22190)
Browse files Browse the repository at this point in the history
[CWS] no trace_pipe with ebpfless
  • Loading branch information
safchain authored Jan 19, 2024
1 parent e7f199f commit f12a851
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/security/tests/module_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,11 @@ func newTestModule(t testing.TB, macroDefs []*rules.MacroDefinition, ruleDefs []
testMod.cmdWrapper = cmdWrapper
testMod.t = t
testMod.opts.dynamicOpts = opts.dynamicOpts
if testMod.tracePipe, err = testMod.startTracing(); err != nil {
return testMod, err

if !opts.staticOpts.enableEBPFLess {
if testMod.tracePipe, err = testMod.startTracing(); err != nil {
return testMod, err
}
}

if opts.staticOpts.preStartCallback != nil {
Expand Down Expand Up @@ -1111,8 +1114,10 @@ func newTestModule(t testing.TB, macroDefs []*rules.MacroDefinition, ruleDefs []
opts.staticOpts.preStartCallback(testMod)
}

if testMod.tracePipe, err = testMod.startTracing(); err != nil {
return nil, err
if !opts.staticOpts.enableEBPFLess {
if testMod.tracePipe, err = testMod.startTracing(); err != nil {
return nil, err
}
}

if opts.staticOpts.snapshotRuleMatchHandler != nil {
Expand Down

0 comments on commit f12a851

Please sign in to comment.