summaryrefslogtreecommitdiff
path: root/integrationtests/readwrite_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-18 14:30:26 +0300
committerPaul Buetow <paul@buetow.org>2026-05-18 14:30:26 +0300
commit7fb497c435596a36c0fb0bd0ecae2a84793bcc70 (patch)
treecc12d16c0e34b034b1fc383a86ec6ffec997381b /integrationtests/readwrite_test.go
parent519cd996b5a7fede23b8b23f3c101d10b26111de (diff)
j6: account bytes for ret-classified syscalls
Diffstat (limited to 'integrationtests/readwrite_test.go')
-rw-r--r--integrationtests/readwrite_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/integrationtests/readwrite_test.go b/integrationtests/readwrite_test.go
index 4e8cbef..69f60ea 100644
--- a/integrationtests/readwrite_test.go
+++ b/integrationtests/readwrite_test.go
@@ -228,3 +228,22 @@ func assertEventBytesReasonable(t *testing.T, result TestResult, exp ExpectedEve
t.Fatalf("expected event not found while asserting byte range: %+v", exp)
}
}
+
+func assertEventDurationPositive(t *testing.T, result TestResult, exp ExpectedEvent) {
+ t.Helper()
+ var matched bool
+ var totalDuration uint64
+ for _, rec := range result.Records {
+ if !matchesExpectation(rec, exp) {
+ continue
+ }
+ matched = true
+ totalDuration += rec.Cnt.Duration
+ }
+ if !matched {
+ t.Fatalf("expected event not found while asserting duration: %+v", exp)
+ }
+ if totalDuration == 0 {
+ t.Fatalf("duration for %+v is zero", exp)
+ }
+}