summaryrefslogtreecommitdiff
path: root/integrationtests
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests')
-rw-r--r--integrationtests/ioctl_test.go17
-rw-r--r--integrationtests/mountfs_test.go6
2 files changed, 22 insertions, 1 deletions
diff --git a/integrationtests/ioctl_test.go b/integrationtests/ioctl_test.go
new file mode 100644
index 0000000..9dbebf7
--- /dev/null
+++ b/integrationtests/ioctl_test.go
@@ -0,0 +1,17 @@
+package integrationtests
+
+import "testing"
+
+// TestIoctlBasic asserts that the ioctl-basic scenario deterministically fires
+// the enter_ioctl tracepoint. ioctl is KindFd (fd@arg0); the fd resolves to the
+// scenario's temp file, so we assert the path as well. Mirrors fcntl_test.go.
+func TestIoctlBasic(t *testing.T) {
+ runScenario(t, "ioctl-basic", []ExpectedEvent{
+ {
+ PathContains: "ioctlfile.txt",
+ Tracepoint: "enter_ioctl",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
diff --git a/integrationtests/mountfs_test.go b/integrationtests/mountfs_test.go
index d50706f..69a19fd 100644
--- a/integrationtests/mountfs_test.go
+++ b/integrationtests/mountfs_test.go
@@ -4,7 +4,7 @@ import "testing"
var mountfsTraceArgs = []string{
"-trace-syscalls",
- "mount,umount,move_mount,fsopen,fsconfig,fspick,open_tree,fsmount,pivot_root,quotactl,statmount,listmount,listns,swapon,swapoff",
+ "mount,umount,move_mount,fsopen,fsconfig,fspick,open_tree,fsmount,pivot_root,quotactl,quotactl_fd,statmount,listmount,listns,swapon,swapoff",
}
func TestMountFsManagementSyscalls(t *testing.T) {
@@ -23,6 +23,10 @@ func TestMountFsManagementSyscalls(t *testing.T) {
{Tracepoint: "enter_fsmount", MinCount: 1},
{Tracepoint: "enter_pivot_root", MinCount: 1},
{Tracepoint: "enter_quotactl", MinCount: 1},
+ // quotactl_fd (KindFd, fd@arg0) is the fd-based sibling of quotactl,
+ // issued best-effort on an fd opened on the mount point. Its sys_enter_
+ // tracepoint fires on kernel entry regardless of privilege/quota support.
+ {Tracepoint: "enter_quotactl_fd", MinCount: 1},
{Tracepoint: "enter_statmount", MinCount: 1},
{Tracepoint: "enter_listmount", MinCount: 1},
{Tracepoint: "enter_listns", MinCount: 1},