diff --git a/integration/ig/k8s/trace_oomkill_test.go b/integration/ig/k8s/trace_oomkill_test.go index 194e0af8c45..fea2c3ff7a4 100644 --- a/integration/ig/k8s/trace_oomkill_test.go +++ b/integration/ig/k8s/trace_oomkill_test.go @@ -38,9 +38,7 @@ func TestTraceOOMKill(t *testing.T) { WithRuntimeMetadata(*containerRuntime), WithContainerImageName("docker.io/library/busybox:latest", isDockerRuntime), ), - KilledComm: "tail", - TriggeredUid: 1000, - TriggeredGid: 2000, + KilledComm: "tail", } normalize := func(e *oomkillTypes.Event) { @@ -57,6 +55,8 @@ func TestTraceOOMKill(t *testing.T) { e.KilledPid = 0 e.Pages = 0 e.TriggeredPid = 0 + e.TriggeredUid = 0 + e.TriggeredGid = 0 e.TriggeredComm = "" e.MountNsID = 0 @@ -90,7 +90,7 @@ spec: memory: "128Mi" command: ["/bin/sh", "-c"] args: - - setuidgid 1000:2000 sh -c "while true; do tail /dev/zero; done" + - while true; do tail /dev/zero; done `, ns) commands := []*Command{ diff --git a/integration/inspektor-gadget/run_trace_oomkill_test.go b/integration/inspektor-gadget/run_trace_oomkill_test.go index a926047154a..3edcebd8b37 100644 --- a/integration/inspektor-gadget/run_trace_oomkill_test.go +++ b/integration/inspektor-gadget/run_trace_oomkill_test.go @@ -38,13 +38,13 @@ func runTraceOOMKill(t *testing.T, ns string, cmd string) { expectedTraceOOMKillJsonObj := map[string]interface{}{ "fpid": 0, - "fuid": 1000, - "fgid": 2000, + "fuid": 0, + "fgid": 0, "tpid": 0, "pages": 0, "mntns_id": 0, "timestamp": "", - "fcomm": "tail", + "fcomm": "", "tcomm": "tail", } @@ -58,7 +58,10 @@ func runTraceOOMKill(t *testing.T, ns string, cmd string) { SetEventRuntimeContainerID(m, "") SetEventRuntimeContainerName(m, "") + m["fcomm"] = "" m["fpid"] = uint32(0) + m["fuid"] = uint32(0) + m["fgid"] = uint32(0) m["tpid"] = uint32(0) m["pages"] = uint32(0) m["mntns_id"] = 0 @@ -86,7 +89,7 @@ spec: memory: "128Mi" command: ["/bin/sh", "-c"] args: - - setuidgid 1000:2000 sh -c "while true; do tail /dev/zero; done" + - while true; do tail /dev/zero; done `, ns) commands := []*Command{ diff --git a/integration/inspektor-gadget/trace_oomkill_test.go b/integration/inspektor-gadget/trace_oomkill_test.go index ea3a97a050d..fed9cab0f17 100644 --- a/integration/inspektor-gadget/trace_oomkill_test.go +++ b/integration/inspektor-gadget/trace_oomkill_test.go @@ -37,10 +37,8 @@ func TestTraceOOMKill(t *testing.T) { StartAndStop: true, ValidateOutput: func(t *testing.T, output string) { expectedEntry := &traceoomkillTypes.Event{ - Event: BuildBaseEvent(ns, WithContainerImageName("docker.io/library/busybox:latest", isDockerRuntime)), - KilledComm: "tail", - TriggeredUid: 1000, - TriggeredGid: 2000, + Event: BuildBaseEvent(ns, WithContainerImageName("docker.io/library/busybox:latest", isDockerRuntime)), + KilledComm: "tail", } expectedEntry.K8s.ContainerName = "test-pod-container" @@ -49,6 +47,8 @@ func TestTraceOOMKill(t *testing.T) { e.KilledPid = 0 e.Pages = 0 e.TriggeredPid = 0 + e.TriggeredUid = 0 + e.TriggeredGid = 0 e.TriggeredComm = "" e.MountNsID = 0 @@ -81,7 +81,7 @@ spec: memory: "128Mi" command: ["/bin/sh", "-c"] args: - - setuidgid 1000:2000 sh -c "while true; do tail /dev/zero; done" + - while true; do tail /dev/zero; done `, ns) commands := []*Command{