From 7fb497c435596a36c0fb0bd0ecae2a84793bcc70 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 18 May 2026 14:30:26 +0300 Subject: j6: account bytes for ret-classified syscalls --- integrationtests/readwrite_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'integrationtests/readwrite_test.go') 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) + } +} -- cgit v1.2.3