summaryrefslogtreecommitdiff
path: root/internal/eventloop_bytes_test.go
diff options
context:
space:
mode:
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)
+ }
+}