Skip to content

Commit

Permalink
test: add kprobe sysfs enable stability test
Browse files Browse the repository at this point in the history
Signed-off-by: Djalal Harouni <[email protected]>
  • Loading branch information
tixxdz committed Dec 28, 2023
1 parent f77efd9 commit 50f95cf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/sensors/tracing/kprobe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6047,3 +6047,24 @@ spec:
err = jsonchecker.JsonTestCheck(t, checker)
assert.NoError(t, err)
}

// This stability of `write_enabled_file_bool` hook.
func TestKprobeSysfsEnableStability(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), tus.Conf().CmdWaitTime)
defer cancel()

hookFull := `apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "kprobes-interface-stability"
spec:
kprobes:
- call: "write_enabled_file_bool"
`
createCrdFile(t, hookFull)

_, err := observertesthelper.GetDefaultObserverWithFile(t, ctx, testConfigFile, tus.Conf().TetragonLib)
if err != nil {
t.Fatalf("GetDefaultObserverWithFile error: %s", err)
}
}

0 comments on commit 50f95cf

Please sign in to comment.