The function in provides zero-copy file transfer using . However, there are no unit tests covering this code path:
No test for sending a file over a pipe
No test for the sendfile path in the client_send pipeline
The EOPNOTSUPP error path (sendfile may fail on some filesystems) is not tested
Location
Suggested Fix
Add a test that:
Creates a temporary file with known content
Creates a File object representing it
Calls over a pipe
Receives the data and verifies it matches
Also tests the error case with an invalid file descriptor
Note: works over pipes on Linux (copies data through), which can be used for testing without a TCP connection.
Severity
Low
Category
Quality
## Description
The function in provides zero-copy file transfer using . However, there are no unit tests covering this code path:
1. No test for sending a file over a pipe
2. No test for the sendfile path in the client_send pipeline
3. The EOPNOTSUPP error path (sendfile may fail on some filesystems) is not tested
## Location
## Suggested Fix
Add a test that:
1. Creates a temporary file with known content
2. Creates a File object representing it
3. Calls over a pipe
4. Receives the data and verifies it matches
5. Also tests the error case with an invalid file descriptor
Note: works over pipes on Linux (copies data through), which can be used for testing without a TCP connection.
## Severity
Low
## Category
Quality
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
The function in provides zero-copy file transfer using . However, there are no unit tests covering this code path:
Location
Suggested Fix
Add a test that:
Note: works over pipes on Linux (copies data through), which can be used for testing without a TCP connection.
Severity
Low
Category
Quality