Skip to content

Commit

Permalink
Fix regression in performance-rt-apps-no-exec-probes (#1593)
Browse files Browse the repository at this point in the history
* Fix regression

* Addressing comments from David R.
  • Loading branch information
edcdavid authored Nov 8, 2023
1 parent 7722e9b commit 7b3dfbc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cnf-certification-test/performance/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package performance

import (
"fmt"
"slices"
"strconv"
"strings"

Expand Down Expand Up @@ -325,13 +326,11 @@ func filterProbeProcesses(allProcesses []*crclient.Process, cut *provider.Contai
}
// remove all exec probes and their children from the process list
for _, p := range allProcesses {
for _, parentProbePid := range execProbeProcesses {
if p.Pid == parentProbePid || p.PPid == parentProbePid {
// skip exec probe processes (child or parent)
continue
}
notExecProbeProcesses = append(notExecProbeProcesses, p)
if slices.Contains(execProbeProcesses, p.Pid) || slices.Contains(execProbeProcesses, p.PPid) {
// this process is part of an exec probe (child or parent), continue
continue
}
notExecProbeProcesses = append(notExecProbeProcesses, p)
}
return notExecProbeProcesses, compliantObjects
}

0 comments on commit 7b3dfbc

Please sign in to comment.