summaryrefslogtreecommitdiff
path: root/internal/eventloop_bytes_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 /internal/eventloop_bytes_test.go
parent519cd996b5a7fede23b8b23f3c101d10b26111de (diff)
j6: account bytes for ret-classified syscalls
Diffstat (limited to 'internal/eventloop_bytes_test.go')
-rw-r--r--internal/eventloop_bytes_test.go18
1 files changed, 18 insertions, 0 deletions
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)
+ }
+}