summaryrefslogtreecommitdiff
path: root/integrationtests
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests')
-rw-r--r--integrationtests/copy_file_range_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/integrationtests/copy_file_range_test.go b/integrationtests/copy_file_range_test.go
index d87c5af..b8e81a6 100644
--- a/integrationtests/copy_file_range_test.go
+++ b/integrationtests/copy_file_range_test.go
@@ -3,7 +3,7 @@ package integrationtests
import "testing"
func TestCopyFileRangeBasic(t *testing.T) {
- runScenario(t, "copy-file-range-basic", []ExpectedEvent{
+ result, _ := runScenarioResult(t, "copy-file-range-basic", []ExpectedEvent{
{
PathContains: "copyrangesrc.txt",
Tracepoint: "enter_copy_file_range",
@@ -11,6 +11,16 @@ func TestCopyFileRangeBasic(t *testing.T) {
MinCount: 1,
},
})
+
+ // copy_file_range is TRANSFER_CLASSIFIED: a successful call reports
+ // ctx->ret > 0, the number of bytes copied from fd_in to fd_out. The
+ // basic scenario copies exactly the 32-byte payload
+ // ("copy_file_range integration data") in a single call, so the exit
+ // byte count is deterministic and must equal 32. Locking in the exact
+ // count guards the transfer attribution (FamilyFS, fd_in@args[0]).
+ exp := ExpectedEvent{Tracepoint: "enter_copy_file_range", Comm: "ioworkload"}
+ assertEventBytesEqual(t, result, exp, 32)
+ assertEventDurationPositive(t, result, exp)
}
func TestCopyFileRangeBadDstFd(t *testing.T) {