summaryrefslogtreecommitdiff
path: root/integrationtests/iouring_test.go
blob: 8ff59ee66787a2372519e226f0985ca5946f1e26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package integrationtests

import "testing"

var iouringTraceArgs = []string{"-trace-syscalls", "io_uring_setup,io_uring_enter,io_uring_register,close"}

func TestIouringSetup(t *testing.T) {
	runScenarioResultWithIorArgs(t, "iouring-setup", []ExpectedEvent{
		{
			Tracepoint: "enter_io_uring_setup",
			Comm:       "ioworkload",
			MinCount:   1,
		},
	}, iouringTraceArgs)
}

func TestIouringEnter(t *testing.T) {
	runScenarioResultWithIorArgs(t, "iouring-enter", []ExpectedEvent{
		{
			Tracepoint: "enter_io_uring_enter",
			Comm:       "ioworkload",
			MinCount:   1,
		},
	}, iouringTraceArgs)
}

func TestIouringRegister(t *testing.T) {
	runScenarioResultWithIorArgs(t, "iouring-register", []ExpectedEvent{
		{
			Tracepoint: "enter_io_uring_register",
			Comm:       "ioworkload",
			MinCount:   1,
		},
	}, iouringTraceArgs)
}

func TestIouringEnterEbadf(t *testing.T) {
	runScenarioResultWithIorArgs(t, "iouring-enter-ebadf", []ExpectedEvent{
		{
			Tracepoint: "enter_io_uring_enter",
			Comm:       "ioworkload",
			MinCount:   1,
		},
	}, iouringTraceArgs)
}

func TestIouringRegisterEbadf(t *testing.T) {
	runScenarioResultWithIorArgs(t, "iouring-register-ebadf", []ExpectedEvent{
		{
			Tracepoint: "enter_io_uring_register",
			Comm:       "ioworkload",
			MinCount:   1,
		},
	}, iouringTraceArgs)
}