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 --- internal/eventloop_bytes_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'internal/eventloop_bytes_test.go') diff --git a/internal/eventloop_bytes_test.go b/internal/eventloop_bytes_test.go index ed7f7af..a7c25ef 100644 --- a/internal/eventloop_bytes_test.go +++ b/internal/eventloop_bytes_test.go @@ -3,6 +3,7 @@ package internal import ( "testing" + "ior/internal/event" "ior/internal/types" ) @@ -71,3 +72,20 @@ func TestBytesFromRet(t *testing.T) { }) } } + +func TestApplyRetBytesForNullEnterRetExitPair(t *testing.T) { + pair := &event.Pair{ + EnterEv: &types.NullEvent{TraceId: types.SYS_ENTER_SPLICE}, + ExitEv: &types.RetEvent{ + TraceId: types.SYS_EXIT_SPLICE, + Ret: 4096, + RetType: types.TRANSFER_CLASSIFIED, + }, + } + + applyRetBytes(pair) + + if pair.Bytes != 4096 { + t.Fatalf("pair.Bytes = %d, want 4096", pair.Bytes) + } +} -- cgit v1.2.3