Page MenuHomeFreeBSD

tests: Add some regression tests for copy_file_range()
ClosedPublic

Authored by markj on Aug 10 2025, 4:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 9:45 PM
Unknown Object (File)
Fri, Oct 10, 9:45 PM
Unknown Object (File)
Fri, Oct 10, 9:44 PM
Unknown Object (File)
Fri, Oct 10, 3:56 PM
Unknown Object (File)
Thu, Oct 2, 11:10 PM
Unknown Object (File)
Thu, Oct 2, 6:00 AM
Unknown Object (File)
Tue, Sep 30, 8:52 AM
Unknown Object (File)
Sep 18 2025, 4:02 AM
Subscribers

Details

Summary

These cover a few bugs that have cropped up, including the ones fixed by
commits 4046ad6bb0e and 2319ca6a0181.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Aug 10 2025, 4:50 PM

Looks good to me. Thanks for doing this, rick

tests/sys/kern/copy_file_range.c
100

Although setting the length to SIZE_MAX is allowed,
it is clipped to SSIZE_MAX. This is because the return value
is "len" and it is signed.

I don't know if this matters for your test, so just consider
this fyi.

This revision is now accepted and ready to land.Aug 11 2025, 3:23 PM
markj added inline comments.
tests/sys/kern/copy_file_range.c
100

It doesn't matter for the test, I just forgot about the clamping. I fixed this in my local version, thanks.

This revision was automatically updated to reflect the committed changes.
markj marked an inline comment as done.