Skip to content

test/syscalls: add recvfrom restart regression test#13248

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl919831639
May 22, 2026
Merged

test/syscalls: add recvfrom restart regression test#13248
copybara-service[bot] merged 2 commits into
masterfrom
test/cl919831639

Conversation

@copybara-service
Copy link
Copy Markdown

test/syscalls: add recvfrom restart regression test

This adds regression coverage for the recvfrom restart behavior fixed by #13212.

The test covers this syscall shape on a Unix SOCK_SEQPACKET socket:

recvfrom(fd, nullptr, 0, MSG_TRUNC | MSG_PEEK, nullptr, nullptr)

Linux restarts this syscall when the blocking thread receives a signal whose handler was installed with SA_RESTART. The test installs a SIGURG handler with SA_RESTART, interrupts the blocked recvfrom, then sends one packet and expects recvfrom to return the packet length.

This syscall shape is relevant to runc's sync socket packet-length probe, which is the path mentioned in #13179.

Related to #13179.

Regression coverage for #13212.

Local verification

make test TARGETS=//test/syscalls:socket_non_stream_blocking_local_test_native \
  OPTIONS="--test_output=errors --nocache_test_results"

Result: PASS

make syscall-tests TARGETS=//test/syscalls:socket_non_stream_blocking_local_test_runsc_systrap_directfs \
  OPTIONS="--test_output=errors --nocache_test_results"

Result: PASS
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13211 from Amaindex:issue13179-recvfrom-restart 9fe6941

Signed-off-by: Zi Li <zi.li@linux.dev>
Signed-off-by: Amaindex <amaindex@outlook.com>
@copybara-service copybara-service Bot added the exported Issue was exported automatically label May 22, 2026
@copybara-service copybara-service Bot merged commit 47470d3 into master May 22, 2026
0 of 2 checks passed
@copybara-service copybara-service Bot deleted the test/cl919831639 branch May 22, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants