Skip to content
14 changes: 7 additions & 7 deletions .gitlab/test/kernel_matrix_testing/security_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ kmt_run_secagent_tests_x64:
- "ubuntu_20.04"
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_4.14"
- "amazon_5.4"
- "amazon_5.10"
Expand Down Expand Up @@ -187,7 +187,7 @@ kmt_run_secagent_tests_x64_peds:
- "ubuntu_20.04"
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_4.14"
- "amazon_5.4"
- "amazon_5.10"
Expand Down Expand Up @@ -226,7 +226,7 @@ kmt_run_secagent_tests_x64_required:
parallel:
matrix:
- TAG:
- "ubuntu_24.10"
- "ubuntu_25.10"
TEST_SET: [cws_req]
after_script:
- !reference [.collect_outcomes_kmt]
Expand Down Expand Up @@ -291,7 +291,7 @@ kmt_run_secagent_tests_x64_docker:
- "ubuntu_20.04"
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_4.14"
- "amazon_5.4"
- "amazon_5.10"
Expand Down Expand Up @@ -328,7 +328,7 @@ kmt_run_secagent_tests_arm64:
- TAG:
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_5.4"
- "amazon_5.10"
- "amazon_2023"
Expand Down Expand Up @@ -364,7 +364,7 @@ kmt_run_secagent_tests_arm64_peds:
- TAG:
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_5.4"
- "amazon_5.10"
- "amazon_2023"
Expand Down Expand Up @@ -442,7 +442,7 @@ kmt_run_secagent_tests_arm64_docker:
- TAG:
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_5.4"
- "amazon_5.10"
- "amazon_2023"
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/test/kernel_matrix_testing/system_probe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ kmt_run_sysprobe_tests_x64:
- "ubuntu_20.04"
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_4.14"
- "amazon_5.4"
- "amazon_5.10"
Expand Down Expand Up @@ -269,7 +269,7 @@ kmt_run_sysprobe_tests_arm64:
- "ubuntu_20.04"
- "ubuntu_22.04"
- "ubuntu_24.04"
- "ubuntu_24.10"
- "ubuntu_25.10"
- "amazon_4.14"
- "amazon_5.4"
- "amazon_5.10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestOOMKillProbe(t *testing.T) {
return false
}, 10*time.Second, 500*time.Millisecond, "failed to find an OOM killed process with pid %d", cmd.Process.Pid)

assert.Regexp(t, regexp.MustCompile("run-([0-9|a-z]*).scope"), result.CgroupName, "cgroup name")
assert.Regexp(t, regexp.MustCompile(`run-.+\.scope`), result.CgroupName, "cgroup name")
assert.Equal(t, result.TriggerPid, result.VictimPid, "tpid == pid")
assert.NotZero(t, result.Score, "score")
assert.Equal(t, int16(42), result.ScoreAdj, "score adj")
Expand Down
6 changes: 4 additions & 2 deletions pkg/ebpf/lockcontention_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ package ebpf
import (
"testing"

"github.com/DataDog/datadog-agent/pkg/util/kernel"

"github.com/cilium/ebpf"
"github.com/stretchr/testify/require"

"github.com/DataDog/datadog-agent/pkg/util/kernel"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

type checkMap struct {
Expand Down Expand Up @@ -174,6 +175,7 @@ func TestLoadWithMaxTrackedRanges(t *testing.T) {
if !lockContentionCollectorSupported() {
t.Skip("EBPF lock contention collector not supported")
}
flake.MarkOnJobName(t, "ubuntu_25.10")

l := NewLockContentionCollector()
require.NotNil(t, l)
Expand Down
2 changes: 1 addition & 1 deletion pkg/network/tracer/tracer_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ func (s *TracerSuite) TestShortWrite() {
require.True(collect, ok)

require.Equal(collect, sent, conn.Monotonic.SentBytes)
}, 3*time.Second, 100*time.Millisecond, "couldn't find connection used by short write")
}, 10*time.Second, 100*time.Millisecond, "couldn't find connection used by short write")
}

func (s *TracerSuite) TestKprobeAttachWithKprobeEvents() {
Expand Down
2 changes: 2 additions & 0 deletions pkg/network/usm/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import (
"github.com/DataDog/datadog-agent/pkg/process/util"
"github.com/DataDog/datadog-agent/pkg/util/kernel"
"github.com/DataDog/datadog-agent/pkg/util/log"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

func TestMain(m *testing.M) {
Expand Down Expand Up @@ -203,6 +204,7 @@ func (s *HTTPTestSuite) TestHTTPMonitorLoadWithIncompleteBuffers() {

func (s *HTTPTestSuite) TestHTTPMonitorIntegrationWithResponseBody() {
t := s.T()
flake.MarkOnJobName(t, "ubuntu_25.10")
serverAddr := "localhost:8080"

tests := []struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/network/usm/usm_grpc_monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/DataDog/datadog-agent/pkg/network/usm/testutil/grpc"
"github.com/DataDog/datadog-agent/pkg/network/usm/utils"
"github.com/DataDog/datadog-agent/pkg/util/kernel"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

const (
Expand Down Expand Up @@ -438,6 +439,7 @@ func (s *usmGRPCSuite) TestLargeBodiesGRPCScenarios() {
if s.isTLS {
t.Skip("Skipping TestLargeBodiesGRPCScenarios for TLS due to flakiness")
}
flake.MarkOnJobName(t, "ubuntu_25.10")

srv, cancel := grpc.NewGRPCTLSServer(t, srvAddr, s.isTLS)
t.Cleanup(cancel)
Expand Down
16 changes: 1 addition & 15 deletions pkg/process/monitor/process_monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package monitor

import (
"os"
"os/exec"
"sync"
"testing"
Expand All @@ -21,7 +20,6 @@ import (

"github.com/DataDog/datadog-agent/pkg/eventmonitor/consumers/testutil"
"github.com/DataDog/datadog-agent/pkg/network/protocols/telemetry"
"github.com/DataDog/datadog-agent/pkg/util/filesystem"
netnsutil "github.com/DataDog/datadog-agent/pkg/util/kernel/netns"
)

Expand Down Expand Up @@ -113,17 +111,6 @@ func registerCallback(t *testing.T, pm *ProcessMonitor, isExec bool, callback *P
return unsubscribe
}

func getTestBinaryPath(t *testing.T) string {
tmpFile, err := os.CreateTemp("", "echo")
require.NoError(t, err)
t.Cleanup(func() {
os.Remove(tmpFile.Name())
})
require.NoError(t, filesystem.CopyFile("/bin/echo", tmpFile.Name()))

return tmpFile.Name()
}

func TestProcessMonitorSingleton(t *testing.T) {
// Making sure we get the same process monitor if we call it twice.
pm := getProcessMonitor(t)
Expand All @@ -140,7 +127,6 @@ type processMonitorSuite struct {
func (s *processMonitorSuite) TestProcessMonitorSanity() {
t := s.T()
pm := getProcessMonitor(t)
testBinaryPath := getTestBinaryPath(t)

execRecorder := newPidRecorder()
registerCallback(t, pm, true, getProcessCallback(execRecorder))
Expand All @@ -149,7 +135,7 @@ func (s *processMonitorSuite) TestProcessMonitorSanity() {
registerCallback(t, pm, false, getProcessCallback(exitRecorder))

initializePM(t, pm, s.useEventStream)
cmd := exec.Command(testBinaryPath, "test")
cmd := exec.Command("/bin/echo", "test")
require.NoError(t, cmd.Run())
require.EventuallyWithT(t, func(ct *assert.CollectT) {
assert.Truef(ct, execRecorder.has(uint32(cmd.Process.Pid)), "didn't capture exec event %d", cmd.Process.Pid)
Expand Down
4 changes: 4 additions & 0 deletions pkg/security/tests/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/DataDog/datadog-agent/pkg/security/secl/model"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
"github.com/DataDog/datadog-agent/pkg/security/utils"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

func TestActionKill(t *testing.T) {
Expand Down Expand Up @@ -749,6 +750,7 @@ func TestActionHash(t *testing.T) {
})

t.Run("exec", func(t *testing.T) {
flake.MarkOnJobName(t, "ubuntu_25.10")
test.msgSender.flush()
test.WaitSignalFromRule(t, func() error {
cmd := exec.Command(testExecutable, "/tmp/aaa")
Expand Down Expand Up @@ -950,6 +952,7 @@ func TestActionKillWithSignature(t *testing.T) {

func TestActionKillContainerWithSignature(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "cws_host")

if testEnvironment == DockerEnvironment {
t.Skip("Skip test spawning docker containers on docker")
Expand Down Expand Up @@ -1156,6 +1159,7 @@ func TestActionKillContainerWithSignature(t *testing.T) {

func TestActionKillContainerWithSignatureBroadRule(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "cws_host")

if testEnvironment == DockerEnvironment {
t.Skip("Skip test spawning docker containers on docker")
Expand Down
2 changes: 2 additions & 0 deletions pkg/security/tests/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
"github.com/DataDog/datadog-agent/pkg/security/utils"
"github.com/DataDog/datadog-agent/pkg/util/kernel"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

func TestMount(t *testing.T) {
Expand Down Expand Up @@ -537,6 +538,7 @@ func TestMountEvent(t *testing.T) {

t.Run("mount-in-container-root", func(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "ubuntu_25.10")

if _, err := whichNonFatal("docker"); err != nil {
t.Skip("Skip test where docker is unavailable")
Expand Down
7 changes: 4 additions & 3 deletions pkg/security/tests/open_tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"time"

"github.com/moby/sys/mountinfo"
"github.com/stretchr/testify/assert"
"golang.org/x/sys/unix"

"github.com/DataDog/datadog-agent/pkg/security/secl/model"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"

"github.com/stretchr/testify/assert"
"golang.org/x/sys/unix"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

func openTreeIsSupported() bool {
Expand Down Expand Up @@ -190,6 +190,7 @@ func TestOpenTree(t *testing.T) {
}()

t.Run("copy-tree-test-detached-recursive", func(t *testing.T) {
flake.MarkOnJobName(t, "ubuntu_25.10")
seen := 0

err = test.GetProbeEvent(func() error {
Expand Down
2 changes: 2 additions & 0 deletions pkg/security/tests/overlayfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
sprobe "github.com/DataDog/datadog-agent/pkg/security/probe"
"github.com/DataDog/datadog-agent/pkg/security/secl/model"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
)

func createOverlayLayer(t *testing.T, test *testModule, name string) string {
Expand Down Expand Up @@ -675,6 +676,7 @@ func TestOverlayOpOverride(t *testing.T) {
})

t.Run("open-from-overlay-mnt", func(t *testing.T) {
flake.MarkOnJobName(t, "ubuntu_25.10")
test.WaitSignalFromRule(t, func() error {
output, err := exec.Command("touch", openTargetFromOverlayMnt).CombinedOutput()
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions pkg/security/tests/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
sprobe "github.com/DataDog/datadog-agent/pkg/security/probe"
"github.com/DataDog/datadog-agent/pkg/security/resolvers/process"
"github.com/DataDog/datadog-agent/pkg/security/utils"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"

"github.com/avast/retry-go/v4"
"github.com/oliveagle/jsonpath"
Expand Down Expand Up @@ -122,6 +123,7 @@ func TestProcessEBPFLess(t *testing.T) {

func TestProcessContext(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "ubuntu_25.10")

executable, err := os.Executable()
if err != nil {
Expand Down Expand Up @@ -1144,6 +1146,7 @@ func TestProcessExecCTime(t *testing.T) {

func TestProcessPIDVariable(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "ubuntu_25.10")

executable := which(t, "touch")

Expand Down Expand Up @@ -1875,6 +1878,7 @@ func TestProcessExit(t *testing.T) {

t.Run("exit-signaled", func(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "ubuntu_25.10")

test.WaitSignalFromRule(t, func() error {
args := []string{"--preserve-status", "--signal=SIGTERM", "2", sleepExec, "9"}
Expand Down Expand Up @@ -2490,6 +2494,7 @@ func TestProcessFilelessExecution(t *testing.T) {

func TestSymLinkResolution(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "ubuntu_25.10")

ruleDefs := []*rules.RuleDefinition{
{
Expand Down
2 changes: 2 additions & 0 deletions pkg/security/tests/sbom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/DataDog/datadog-agent/pkg/security/secl/containerutils"
"github.com/DataDog/datadog-agent/pkg/security/secl/model"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"

"github.com/avast/retry-go/v4"
)
Expand Down Expand Up @@ -100,6 +101,7 @@ func TestSBOM(t *testing.T) {
})

t.Run("host", func(t *testing.T) {
flake.MarkOnJobName(t, "ubuntu_25.10")
test.WaitSignalFromRule(t, func() error {
sbom := p.Resolvers.SBOMResolver.GetWorkload("")
if sbom == nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/security/tests/selftests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ import (
"github.com/DataDog/datadog-agent/pkg/security/events"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
"github.com/DataDog/datadog-agent/pkg/util/log"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"

"github.com/avast/retry-go/v4"
"github.com/oliveagle/jsonpath"
"github.com/stretchr/testify/assert"
)

func TestSelfTests(t *testing.T) {
SkipIfNotAvailable(t)
flake.MarkOnJobName(t, "ubuntu_25.10")

test, err := newTestModule(t, nil, []*rules.RuleDefinition{}, withStaticOpts(testOpts{enableSelfTests: true}))
if err != nil {
Expand Down
Loading