summaryrefslogtreecommitdiff
path: root/integrationtests/mmap_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-22 18:20:44 +0200
committerPaul Buetow <paul@buetow.org>2026-02-22 18:20:44 +0200
commit8e52ba5a8661c717f45e00608ad64f0adc6de3e1 (patch)
treec90dcccca9168552d311312ba238e7b84fab9e0d /integrationtests/mmap_test.go
parent40ce5bc1d9da31b49f42e488d2ab5633e7c6a3fb (diff)
Implement mmap/msync syscall support with unit and integration coverage
Diffstat (limited to 'integrationtests/mmap_test.go')
-rw-r--r--integrationtests/mmap_test.go46
1 files changed, 46 insertions, 0 deletions
diff --git a/integrationtests/mmap_test.go b/integrationtests/mmap_test.go
new file mode 100644
index 0000000..89cce66
--- /dev/null
+++ b/integrationtests/mmap_test.go
@@ -0,0 +1,46 @@
+package integrationtests
+
+import "testing"
+
+func TestMmapBasic(t *testing.T) {
+ runScenario(t, "mmap-basic", []ExpectedEvent{
+ {
+ PathContains: "mmapfile.txt",
+ Tracepoint: "enter_mmap",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestMmapMsyncSync(t *testing.T) {
+ runScenario(t, "mmap-msync-sync", []ExpectedEvent{
+ {
+ PathContains: "msyncfile.txt",
+ Tracepoint: "enter_mmap",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ {
+ Tracepoint: "enter_msync",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestMmapMsyncInvalidFlags(t *testing.T) {
+ runScenario(t, "mmap-msync-invalid-flags", []ExpectedEvent{
+ {
+ PathContains: "msyncinvalidfile.txt",
+ Tracepoint: "enter_mmap",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ {
+ Tracepoint: "enter_msync",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}